feat: gateway 结合 saToken

This commit is contained in:
2024-02-18 18:50:18 +08:00
parent fab5c5bf97
commit 065ec97aa2
14 changed files with 760 additions and 15 deletions

View File

@@ -43,5 +43,18 @@
<artifactId>sa-token-spring-boot-starter</artifactId>
<version>1.37.0</version>
</dependency>
<!-- Sa-Token 整合 Redis (使用 jackson 序列化方式) -->
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-redis-jackson</artifactId>
<version>1.37.0</version>
</dependency>
<!-- 提供Redis连接池 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.9.0</version>
</dependency>
</dependencies>
</project>

View File

@@ -1,13 +0,0 @@
package com.landaiqing;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}

View File

@@ -27,6 +27,28 @@ spring:
enabled: true
config:
enabled: true
# redis配置
redis:
# Redis数据库索引默认为0
database: 1
# Redis服务器地址
host: 116.196.80.239
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码默认为空
password: LDQ20020618xxx
# 连接超时时间
timeout: 2s
lettuce:
pool:
# 连接池最大连接数
max-active: 200
# 连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# 连接池中的最大空闲连接
max-idle: 10
# 连接池中的最小空闲连接
min-idle: 0
publicKey: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKsYR+P7j9DehNkZaLxNeeoqU6ThCw3SNYCoPt1S7yeP1gEzpdS1cCQcz7/7OLQI/iFFjIJgXQDM2CA85yIomTMCAwEAAQ==
logging:
config: classpath:log4j2-spring.xml