@@ -19,13 +19,63 @@ You can have an overview of our Spring Boot Server with the diagram below:
19
19
20
20
![ spring-boot-jwt-authentication-spring-security-architecture] ( spring-boot-jwt-authentication-spring-security-architecture.png )
21
21
22
+ ## Configure Spring Datasource, JPA, App properties
23
+ Open ` src/main/resources/application.properties `
24
+
25
+ ``` properties
26
+ spring.datasource.url = jdbc:mysql://localhost:3306/testdb?useSSL =false
27
+ spring.datasource.username = root
28
+ spring.datasource.password = 123456
29
+
30
+ spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
31
+ spring.jpa.hibernate.ddl-auto = update
32
+
33
+ # App Properties
34
+ bezkoder.app.jwtSecret = bezKoderSecretKey
35
+ bezkoder.app.jwtExpirationMs = 3600000
36
+ bezkoder.app.jwtRefreshExpirationMs = 86400000
37
+ ```
38
+
39
+ ## Run Spring Boot application
40
+ ```
41
+ mvn spring-boot:run
42
+ ```
43
+
44
+ ## Run following SQL insert statements
45
+ ```
46
+ INSERT INTO roles(name) VALUES('ROLE_USER');
47
+ INSERT INTO roles(name) VALUES('ROLE_MODERATOR');
48
+ INSERT INTO roles(name) VALUES('ROLE_ADMIN');
49
+ ```
50
+
22
51
Related Posts:
23
52
> [ Spring Boot, Spring Security, MySQL: JWT Authentication & Authorization example] ( https://bezkoder.com/spring-boot-jwt-authentication/ )
24
53
25
54
> [ For PostgreSQL] ( https://bezkoder.com/spring-boot-security-postgresql-jwt-authentication/ )
26
55
27
56
> [ For MongoDB] ( https://bezkoder.com/spring-boot-jwt-auth-mongodb/ )
28
57
58
+ ## More Practice:
59
+ > [ Spring Boot File upload example with Multipart File] ( https://bezkoder.com/spring-boot-file-upload/ )
60
+
61
+ > [ Exception handling: @RestControllerAdvice example in Spring Boot] ( https://bezkoder.com/spring-boot-restcontrolleradvice/ )
62
+
63
+ > [ Spring Boot Repository Unit Test with @DataJpaTest ] ( https://bezkoder.com/spring-boot-unit-test-jpa-repo-datajpatest/ )
64
+
65
+ > [ Spring Boot Pagination & Sorting example] ( https://www.bezkoder.com/spring-boot-pagination-sorting-example/ )
66
+
67
+ Associations:
68
+ > [ Spring Boot One To Many example with Spring JPA, Hibernate] ( https://www.bezkoder.com/jpa-one-to-many/ )
69
+
70
+ > [ Spring Boot Many To Many example with Spring JPA, Hibernate] ( https://www.bezkoder.com/jpa-many-to-many/ )
71
+
72
+ > [ JPA One To One example with Spring Boot] ( https://www.bezkoder.com/jpa-one-to-one/ )
73
+
74
+ Deployment:
75
+ > [ Deploy Spring Boot App on AWS – Elastic Beanstalk] ( https://www.bezkoder.com/deploy-spring-boot-aws-eb/ )
76
+
77
+ > [ Docker Compose Spring Boot and MySQL example] ( https://www.bezkoder.com/docker-compose-spring-boot-mysql/ )
78
+
29
79
## Fullstack Authentication
30
80
31
81
> [ Spring Boot + Vue.js JWT Authentication] ( https://bezkoder.com/spring-boot-vue-js-authentication-jwt-spring-security/ )
@@ -36,11 +86,23 @@ Related Posts:
36
86
37
87
> [ Spring Boot + Angular 11 JWT Authentication] ( https://bezkoder.com/angular-11-spring-boot-jwt-auth/ )
38
88
89
+ > [ Spring Boot + Angular 12 JWT Authentication] ( https://www.bezkoder.com/angular-12-spring-boot-jwt-auth/ )
90
+
91
+ > [ Spring Boot + Angular 13 JWT Authentication] ( https://www.bezkoder.com/angular-13-spring-boot-jwt-auth/ )
92
+
93
+ > [ Spring Boot + Angular 14 JWT Authentication] ( https://www.bezkoder.com/angular-14-spring-boot-jwt-auth/ )
94
+
39
95
> [ Spring Boot + React JWT Authentication] ( https://bezkoder.com/spring-boot-react-jwt-auth/ )
40
96
41
97
## Fullstack CRUD App
42
98
43
- > [ Vue.js + Spring Boot + MySQL/PostgreSQL example] ( https://bezkoder.com/spring-boot-vue-js-crud-example/ )
99
+ > [ Vue.js + Spring Boot + H2 Embedded database example] ( https://www.bezkoder.com/spring-boot-vue-js-crud-example/ )
100
+
101
+ > [ Vue.js + Spring Boot + MySQL example] ( https://www.bezkoder.com/spring-boot-vue-js-mysql/ )
102
+
103
+ > [ Vue.js + Spring Boot + PostgreSQL example] ( https://www.bezkoder.com/spring-boot-vue-js-postgresql/ )
104
+
105
+ > [ Angular 8 + Spring Boot + Embedded database example] ( https://www.bezkoder.com/angular-spring-boot-crud/ )
44
106
45
107
> [ Angular 8 + Spring Boot + MySQL example] ( https://bezkoder.com/angular-spring-boot-crud/ )
46
108
@@ -54,6 +116,24 @@ Related Posts:
54
116
55
117
> [ Angular 11 + Spring Boot + PostgreSQL example] ( https://bezkoder.com/angular-11-spring-boot-postgresql/ )
56
118
119
+ > [ Angular 12 + Spring Boot + Embedded database example] ( https://www.bezkoder.com/angular-12-spring-boot-crud/ )
120
+
121
+ > [ Angular 12 + Spring Boot + MySQL example] ( https://www.bezkoder.com/angular-12-spring-boot-mysql/ )
122
+
123
+ > [ Angular 12 + Spring Boot + PostgreSQL example] ( https://www.bezkoder.com/angular-12-spring-boot-postgresql/ )
124
+
125
+ > [ Angular 13 + Spring Boot + H2 Embedded Database example] ( https://www.bezkoder.com/spring-boot-angular-13-crud/ )
126
+
127
+ > [ Angular 13 + Spring Boot + MySQL example] ( https://www.bezkoder.com/spring-boot-angular-13-mysql/ )
128
+
129
+ > [ Angular 13 + Spring Boot + PostgreSQL example] ( https://www.bezkoder.com/spring-boot-angular-13-postgresql/ )
130
+
131
+ > [ Angular 14 + Spring Boot + H2 Embedded Database example] ( https://www.bezkoder.com/spring-boot-angular-14-crud/ )
132
+
133
+ > [ Angular 14 + Spring Boot + MySQL example] ( https://www.bezkoder.com/spring-boot-angular-14-mysql/ )
134
+
135
+ > [ Angular 14 + Spring Boot + PostgreSQL example] ( https://www.bezkoder.com/spring-boot-angular-14-postgresql/ )
136
+
57
137
> [ React + Spring Boot + MySQL example] ( https://bezkoder.com/react-spring-boot-crud/ )
58
138
59
139
> [ React + Spring Boot + PostgreSQL example] ( https://bezkoder.com/spring-boot-react-postgresql/ )
@@ -74,65 +154,16 @@ Run both Back-end & Front-end in one place:
74
154
75
155
> [ Spring Boot Repository Unit Test with @DataJpaTest ] ( https://bezkoder.com/spring-boot-unit-test-jpa-repo-datajpatest/ )
76
156
77
- > [ Deploy Spring Boot App on AWS – Elastic Beanstalk] ( https://bezkoder.com/deploy-spring-boot-aws-eb/ )
78
-
79
- > [ Secure Spring Boot App with Spring Security & JWT Authentication] ( https://bezkoder.com/spring-boot-jwt-authentication/ )
80
-
81
- ## Dependency
82
- ``` xml
83
- <dependency >
84
- <groupId >org.springframework.boot</groupId >
85
- <artifactId >spring-boot-starter-data-jpa</artifactId >
86
- </dependency >
87
-
88
- <dependency >
89
- <groupId >org.springframework.boot</groupId >
90
- <artifactId >spring-boot-starter-security</artifactId >
91
- </dependency >
92
-
93
- <dependency >
94
- <groupId >org.springframework.boot</groupId >
95
- <artifactId >spring-boot-starter-web</artifactId >
96
- </dependency >
97
-
98
- <dependency >
99
- <groupId >mysql</groupId >
100
- <artifactId >mysql-connector-java</artifactId >
101
- <scope >runtime</scope >
102
- </dependency >
103
-
104
- <dependency >
105
- <groupId >io.jsonwebtoken</groupId >
106
- <artifactId >jjwt</artifactId >
107
- <version >0.9.1</version >
108
- </dependency >
109
- ```
157
+ > [ Spring Boot Pagination & Sorting example] ( https://www.bezkoder.com/spring-boot-pagination-sorting-example/ )
110
158
111
- ## Configure Spring Datasource, JPA, App properties
112
- Open ` src/main/resources/application.properties `
159
+ Associations:
160
+ > [ Spring Boot One To Many example with Spring JPA, Hibernate ] ( https://www.bezkoder.com/jpa-one-to-many/ )
113
161
114
- ``` properties
115
- spring.datasource.url = jdbc:mysql://localhost:3306/testdb?useSSL =false
116
- spring.datasource.username = root
117
- spring.datasource.password = 123456
118
-
119
- spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
120
- spring.jpa.hibernate.ddl-auto = update
162
+ > [ Spring Boot Many To Many example with Spring JPA, Hibernate] ( https://www.bezkoder.com/jpa-many-to-many/ )
121
163
122
- # App Properties
123
- bezkoder.app.jwtSecret = bezKoderSecretKey
124
- bezkoder.app.jwtExpirationMs = 3600000
125
- bezkoder.app.jwtRefreshExpirationMs = 86400000
126
- ```
164
+ > [ JPA One To One example with Spring Boot] ( https://www.bezkoder.com/jpa-one-to-one/ )
127
165
128
- ## Run Spring Boot application
129
- ```
130
- mvn spring-boot:run
131
- ```
166
+ Deployment:
167
+ > [ Deploy Spring Boot App on AWS – Elastic Beanstalk] ( https://www.bezkoder.com/deploy-spring-boot-aws-eb/ )
132
168
133
- ## Run following SQL insert statements
134
- ```
135
- INSERT INTO roles(name) VALUES('ROLE_USER');
136
- INSERT INTO roles(name) VALUES('ROLE_MODERATOR');
137
- INSERT INTO roles(name) VALUES('ROLE_ADMIN');
138
- ```
169
+ > [ Docker Compose Spring Boot and MySQL example] ( https://www.bezkoder.com/docker-compose-spring-boot-mysql/ )
0 commit comments