diff --git a/das/pom.xml b/das/pom.xml
index fefc5527..abe9b329 100644
--- a/das/pom.xml
+++ b/das/pom.xml
@@ -3,7 +3,12 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 3.3.0
+
+
com.das
das
1.0.0-release
@@ -11,44 +16,17 @@
base das project for Spring Boot
- UTF-8
- UTF-8
17
- 1.8
- 1.8
+
3.8.1
-
- 1.2.9
- 1.21
2.3.2
- 1.2.83
- 2.7.6
- 3.5.2
+ 3.5.5
5.8.18
-
-
- 1.5.2.Final
- 1.18.20
- 29.0-jre
- 1.9
+
42.2.24
- 1.34.0
+ 1.38.0
-
-
-
-
- org.springframework.boot
- spring-boot-dependencies
- ${spring.boot.version}
- pom
- import
-
-
-
-
-
org.springframework.boot
@@ -79,24 +57,25 @@
org.postgresql
postgresql
${postgresql.version}
+ runtime
cn.dev33
- sa-token-core
+ sa-token-spring-boot3-starter
${sa.version}
cn.dev33
- sa-token-spring-boot-starter
+ sa-token-redis-jackson
${sa.version}
+
- cn.dev33
- sa-token-dao-redis
- ${sa.version}
+ org.apache.commons
+ commons-pool2
@@ -109,7 +88,6 @@
org.projectlombok
lombok
- ${org.projectlombok.version}
true
@@ -122,110 +100,47 @@
com.baomidou
- mybatis-plus-boot-starter
+ mybatis-plus-spring-boot3-starter
${mybatis.plus.spring.boot}
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
-
- com.alibaba
- druid-spring-boot-starter
- ${druid.version}
-
-
-
- com.alibaba
- fastjson
- ${fastjson.version}
-
-
+
cn.hutool
- hutool-all
+ hutool-core
${hutool.version}
-
-
- org.apache.commons
- commons-text
- ${apache.commons.text}
+ cn.hutool
+ hutool-crypto
+ ${hutool.version}
-
-
org.springframework.boot
spring-boot-starter-validation
-
-
- com.google.guava
- guava
- ${google.guava.version}
-
org.springframework.boot
spring-boot-starter-data-redis
-
-
- org.apache.commons
- commons-pool2
-
+
org.springframework.boot
spring-boot-starter-aop
-
-
-
- src/main/resources
-
-
- src/main/java
-
- **/*.xml
-
-
-
org.springframework.boot
spring-boot-maven-plugin
- ${spring.boot.version}
-
-
-
-
- repackage
-
-
-
- true
- true
-
-
- org.springframework.boot
- spring-boot-configuration-processor
-
org.projectlombok
lombok
@@ -233,18 +148,6 @@
-
- maven-compiler-plugin
- ${maven.plugin.version}
-
- ${java.version}
- ${java.version}
- UTF-8
-
- -parameters
-
-
-
diff --git a/das/src/main/java/com/das/common/config/AesProperties.java b/das/src/main/java/com/das/common/config/AesProperties.java
new file mode 100644
index 00000000..5fd42375
--- /dev/null
+++ b/das/src/main/java/com/das/common/config/AesProperties.java
@@ -0,0 +1,23 @@
+package com.das.common.config;
+
+import lombok.Data;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author zb
+ * @Description
+ */
+@Component
+@Getter
+@Setter
+@ConfigurationProperties(prefix = "aes")
+public class AesProperties {
+
+ /**
+ * token 请求头
+ */
+ private String aeskey;
+}
diff --git a/das/src/main/java/com/das/common/config/SaTokenProperties.java b/das/src/main/java/com/das/common/config/SaTokenProperties.java
new file mode 100644
index 00000000..d687ef60
--- /dev/null
+++ b/das/src/main/java/com/das/common/config/SaTokenProperties.java
@@ -0,0 +1,38 @@
+package com.das.common.config;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author zb
+ * @Description
+ */
+
+@Component
+@Getter
+@Setter
+@ConfigurationProperties(prefix = "sa-token")
+public class SaTokenProperties {
+
+ /**
+ * token 请求头
+ */
+ private String tokenHeader;
+
+ /**
+ * token前缀
+ */
+ private String tokenPrefix;
+
+ /**
+ * token过期时间,单位 秒,默认 2个小时
+ */
+ private Integer expireTime;
+
+ /**
+ * 刷新token过期时间,单位 秒,默认 7 天
+ */
+ private Integer refreshExpireTime;
+}
diff --git a/das/src/main/java/com/das/common/config/WebConfig.java b/das/src/main/java/com/das/common/config/WebConfig.java
deleted file mode 100644
index 9957a6f0..00000000
--- a/das/src/main/java/com/das/common/config/WebConfig.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.das.common.config;
-
-import com.das.common.interceptor.TokenInterceptor;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-@Configuration
-public class WebConfig implements WebMvcConfigurer {
-
- @Bean
- public TokenInterceptor getTokenInterceptor() {
- return new TokenInterceptor();
- }
- @Override
- public void addInterceptors(InterceptorRegistry registry) {
- // 将Token拦截器添加到注册表中
- registry.addInterceptor(getTokenInterceptor())
- // 可以指定拦截哪些路径,例如"/api/**"表示所有以/api开头的路径
-// .addPathPatterns("/api/**");
- // 排除不需要拦截的路径
- .excludePathPatterns("/api/**");
- }
-}
diff --git a/das/src/main/java/com/das/common/config/redis/FastJson2RedisSerializer.java b/das/src/main/java/com/das/common/config/redis/FastJson2RedisSerializer.java
deleted file mode 100644
index 412f39c0..00000000
--- a/das/src/main/java/com/das/common/config/redis/FastJson2RedisSerializer.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.das.common.config.redis;
-
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.parser.ParserConfig;
-import com.alibaba.fastjson.serializer.SerializerFeature;
-import com.fasterxml.jackson.databind.JavaType;
-import com.fasterxml.jackson.databind.type.TypeFactory;
-import org.springframework.data.redis.serializer.RedisSerializer;
-import org.springframework.data.redis.serializer.SerializationException;
-
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
-
-/**
- * @author chenhaojie
- * @Description Redis 使用 FastJson 序列化
- */
-public class FastJson2RedisSerializer implements RedisSerializer {
-
- public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
-
- private Class tClass;
-
- static {
- // 支持自动类型匹配
- ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
- }
-
- public FastJson2RedisSerializer(Class tClass){
- super();
- this.tClass = tClass;
- }
-
- @Override
- public byte[] serialize(T t) throws SerializationException {
- if (t == null) {
- return new byte[0];
- }
- try {
- return JSON.toJSONString(t, SerializerFeature.WriteClassName).getBytes(DEFAULT_CHARSET);
- } catch (Exception e) {
- throw new SerializationException("Could not serialize: " + e.getMessage(), e);
- }
- }
-
- @Override
- public T deserialize(byte[] bytes) throws SerializationException {
- if (bytes == null || bytes.length <= 0){
- return null;
- }
- String str = new String(bytes, DEFAULT_CHARSET);
- try {
- return JSON.parseObject(str, tClass);
- } catch (Exception e) {
- throw new SerializationException("Could not deserialize: " + e.getMessage(), e);
- }
- }
-
- protected JavaType getJavaType(Class> tClass){
- return TypeFactory.defaultInstance().constructType(tClass);
- }
-}
-
diff --git a/das/src/main/java/com/das/common/config/redis/RedisConfig.java b/das/src/main/java/com/das/common/config/redis/RedisConfig.java
index ac17682c..ad1cce5b 100644
--- a/das/src/main/java/com/das/common/config/redis/RedisConfig.java
+++ b/das/src/main/java/com/das/common/config/redis/RedisConfig.java
@@ -4,6 +4,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
/**
@@ -24,8 +25,8 @@ public class RedisConfig {
redisTemplate.setConnectionFactory(redisConnectionFactory);
// 使用Jackson2JsonRedisSerialize 替换默认序列化
-// Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
- FastJson2RedisSerializer