Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Learning Materials
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Internet Services Architectures
Learning Materials
Commits
167b5752
Commit
167b5752
authored
6 months ago
by
Michał Wójcik
Browse files
Options
Downloads
Patches
Plain Diff
feat: dates update and small fixes
parent
530cbed6
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
01 Spring Platform/01 Spring Platform.md
+4
-5
4 additions, 5 deletions
01 Spring Platform/01 Spring Platform.md
02 Spring Data JPA/02 Spring Data JPA.md
+3
-3
3 additions, 3 deletions
02 Spring Data JPA/02 Spring Data JPA.md
with
7 additions
and
8 deletions
01 Spring Platform/01 Spring Platform.md
+
4
−
5
View file @
167b5752
...
...
@@ -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 field
s) can be created,
*
immutable objects (
final fields and no setter
s) 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
)
{
...
...
This diff is collapsed.
Click to expand it.
02 Spring Data JPA/02 Spring Data JPA.md
+
3
−
3
View file @
167b5752
...
...
@@ -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 use
r
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 use
r
`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:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment