Skip to content
Snippets Groups Projects
Commit 167b5752 authored by Michał Wójcik's avatar Michał Wójcik
Browse files

feat: dates update and small fixes

parent 530cbed6
Branches
No related merge requests found
......@@ -164,7 +164,7 @@ There are three methods for dependency injection:
```java
public class UserService {
private UserRepository repository;
private final UserRepository repository;
public UserService(UserRepository repository) {
this.repository = repository;
......@@ -180,7 +180,7 @@ UserService service = new UserService(repository);
Injection with constructor:
* immutable objects (no setters and final fields) can be created,
* immutable objects (final fields and no setters) can be created,
* construction and injection in single step.
---
......@@ -252,7 +252,7 @@ Dependency Injection in Spring Container:
```java
public class UserService {
private UserRepository repository;
private final UserRepository repository;
@Autowired
public UserService(UserRepository repository) {
......@@ -319,11 +319,10 @@ Initialization:
Command line applications in Spring Boot can be achieved with components implementing `CommandLineRunner` interface:
```java
@Component
public class ApplicationCommand implements CommandLineRunner {
private UserService service;
private final UserService service;
@Autowired
public CommandLine(UserService service) {
......
......@@ -18,7 +18,7 @@ Michał Wójcik
* Spring Data Commons - core concepts for every Spring Data module
* Spring Data JDBC - SQL database access using JDBC,
* Spring Data JDBC Ext - support for databases specific ex tensions,
* Spring Data JDBC Ext - support for databases specific extensions,
* Spring Data JPA - SQL database access using JPA,
* Spring Data KeyValue - support for key-value stores (non-relational databases, map-reduce frameworks),
* Spring Data LDAP - support for LDAP catalog,
......@@ -95,7 +95,7 @@ JPA is only a standard, there is a number of implementations:
* `unique` – if column values are unique,
* `updatable` – if column value can up updated after row creation;
* `@Temporal` – required for `Date` i `Calendar` types:
* allows to user database date/time types to be used to store values (if database supports them);
* allows to use database date/time types to be used to store values (if database supports them);
* `@Transient` – fields which will be skipped during object-relational mapping.
---
......@@ -207,7 +207,7 @@ public class Character {
### Connection configuration
There are several methods for defining connection to the database in Spring.
One of the easiest is to user `application.properties` configuration file stored in project sources.
One of the easiest is to use `application.properties` configuration file stored in project sources.
Data source settings:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment