File tree Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ v.3.x 为springboot 3.x版本,使用jdk17版本
18
18
19
19
* springboot-starter | Springboot领域驱动框架
20
20
* springboot-starter-data-fast | 快速数据呈现框架
21
- * springboot-starter-security-jwt | security&jwt权限框架
21
+ * springboot-starter-security | security&jwt权限框架
22
22
23
23
## SpringBoot DDD Architecture | SpringBoot DDD 框架图
24
24
@@ -44,7 +44,7 @@ v.3.x 为springboot 3.x版本,使用jdk17版本
44
44
<!-- security&jwt权限框架 -->
45
45
<dependency>
46
46
<groupId>com.codingapi.springboot</groupId>
47
- <artifactId>springboot-starter-security-jwt </artifactId>
47
+ <artifactId>springboot-starter-security</artifactId>
48
48
<version>${last.version}</version>
49
49
</dependency>
50
50
Original file line number Diff line number Diff line change 1
- springboot-starter-security-jwt 功能介绍
1
+ springboot-starter-security 功能介绍
2
+
3
+ 支持无状态的JWT和有状态的redis两种不同的token机制
2
4
3
5
配置文件,默认参数即说明
4
6
``` properties
7
+ # JWT开关
8
+ codingapi.security.jwt.enable =true
5
9
# JWT密钥 需大于32位的字符串
6
- codingapi.security.jwt-secret =codingapi.security.jwt.secretkey
10
+ codingapi.security.jwt.secret-key =codingapi.security.jwt.secretkey
11
+
12
+ # JWT 有效时间(毫秒) 15分钟有效期 1000*60*15=900000
13
+ codingapi.security.jwt.valid-time =900000
14
+ # JWT 更换令牌时间(毫秒) 10分钟后更换令牌 1000*60*10=600000
15
+ codingapi.security.jwt.rest-time =600000
16
+
7
17
# JWT AES密钥
8
18
codingapi.security.ase-key =QUNEWCQlXiYqJCNYQ1phc0FDRFgkJV4mKiQjWENaYXM =
9
19
# JWT AES IV
10
20
codingapi.security.aes-iv =QUNYRkdIQEVEUyNYQ1phcw ==
11
21
12
- # JWT 有效时间(毫秒) 15分钟有效期 1000*60*15=900000
13
- codingapi.security.jwt-time =900000
14
- # JWT 更换令牌时间(毫秒) 10分钟后更换令牌 1000*60*10=600000
15
- codingapi.security.jwt-rest-time =600000
22
+ # Redis开关
23
+ # codingapi.security.redis.enable=true
24
+ # spring.data.redis.host=localhost
25
+ # spring.data.redis.port=6379
16
26
17
27
# Security 配置 请求权限拦截地址
18
28
codingapi.security.authenticated-urls =/api/**
You can’t perform that action at this time.
0 commit comments