Skip to content

Commit d7bc0fb

Browse files
committed
jjwt
1 parent 667ab5f commit d7bc0fb

File tree

3 files changed

+99
-0
lines changed

3 files changed

+99
-0
lines changed

handsonDoc/DSW011-MongoTemplate.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# DSW011-MongoTemplate
2+
3+
lin-jinwei
4+
5+
注意,未授权不得擅自以盈利方式转载本博客任何文章。
6+
7+
---
8+
9+
Code: [../code/S7-dsw-mongodb-rest-2/](../code/)
10+
11+
12+
## SpringBoot Initializr 创建项目
13+
14+
![alt text](image-63.png)
15+
16+
## 引入 gradle依赖
17+
18+
### lombok
19+
gradle:https://projectlombok.org/setup/gradle
20+
21+
22+
```gradle
23+
repositories {
24+
mavenCentral()
25+
}
26+
27+
dependencies {
28+
compileOnly 'org.projectlombok:lombok:1.18.34'
29+
annotationProcessor 'org.projectlombok:lombok:1.18.34'
30+
31+
testCompileOnly 'org.projectlombok:lombok:1.18.34'
32+
testAnnotationProcessor 'org.projectlombok:lombok:1.18.34'
33+
}
34+
```
35+
36+
### jjwt
37+
38+
```gradle
39+
// https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt
40+
implementation group: 'io.jsonwebtoken', name: 'jjwt', version: '0.12.6'
41+
```
42+
43+
44+
## 设置 IDEA-MongoDB数据库
45+
46+
### application.properties 文件配置
47+
48+
代码:resources/application.properties
49+
50+
```bash
51+
spring.application.name=S7-dsw-mongodb-rest-2
52+
53+
spring.data.mongodb.uri=mongodb://127.0.0.1:27017/c_db
54+
```
55+
56+
## 主类程序
57+
58+
```java
59+
60+
```
61+
62+
## 创建实体类:Connector
63+
64+
代码:
65+
66+
```java
67+
```
68+
69+
70+
71+
72+
73+
74+
75+
76+
77+
78+
79+
80+
81+
82+
83+
84+
85+
86+
87+
88+
89+
90+
91+
92+
93+
94+
95+
96+
97+
98+
99+

handsonDoc/image-61.png

213 KB
Loading

handsonDoc/image-63.png

250 KB
Loading

0 commit comments

Comments
 (0)