diff --git a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/AppProperties.java b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/AppProperties.java
deleted file mode 100644
index 80749ddb..00000000
--- a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/AppProperties.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2021-2026 Odboy
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.odboy.framework.properties;
-
-import cn.odboy.framework.properties.model.CaptchaModel;
-import cn.odboy.framework.properties.model.ContentRsaEncodeSettingModel;
-import cn.odboy.framework.properties.model.JwtAuthSettingModel;
-import cn.odboy.framework.properties.model.StorageOSSModel;
-import cn.odboy.framework.properties.model.ThreadPoolSettingModel;
-import cn.odboy.framework.properties.model.UserLoginSettingModel;
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.stereotype.Component;
-
-/**
- * 应用配置
- *
- * @author odboy
- * @date 2025-04-13
- */
-@Data
-@Component
-@ConfigurationProperties(prefix = "app")
-public class AppProperties {
-
- private ContentRsaEncodeSettingModel rsa;
- private JwtAuthSettingModel jwt;
- private UserLoginSettingModel login;
- private ThreadPoolSettingModel asyncTaskPool;
- private CaptchaModel captcha;
- private StorageOSSModel oss;
-}
-
-
diff --git a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/CaptchaModel.java b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/CaptchaModel.java
deleted file mode 100644
index 5c43beec..00000000
--- a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/CaptchaModel.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2021-2026 Odboy
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.odboy.framework.properties.model;
-
-import cn.odboy.base.KitObject;
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class CaptchaModel extends KitObject {
-
- /**
- * 验证码有效时间, 单位: 秒
- */
- private Long expireTime;
-}
diff --git a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/ContentRsaEncodeSettingModel.java b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/ContentRsaEncodeSettingModel.java
deleted file mode 100644
index 6715946f..00000000
--- a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/ContentRsaEncodeSettingModel.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2021-2026 Odboy
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.odboy.framework.properties.model;
-
-import cn.odboy.base.KitObject;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 密码加密传输, 前端公钥加密,后端私钥解密
- */
-@Getter
-@Setter
-public class ContentRsaEncodeSettingModel extends KitObject {
-
- private String privateKey;
-}
diff --git a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/JwtAuthSettingModel.java b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/JwtAuthSettingModel.java
deleted file mode 100644
index db09e5f8..00000000
--- a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/JwtAuthSettingModel.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2021-2026 Odboy
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.odboy.framework.properties.model;
-
-import cn.odboy.base.KitObject;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * Jwt参数配置
- */
-@Getter
-@Setter
-public class JwtAuthSettingModel extends KitObject {
-
- /**
- * 必须使用最少88位的Base64对该令牌进行编码
- */
- private String base64Secret;
-
- /**
- * 令牌过期时间 此处单位/毫秒
- */
- private Long tokenValidityInSeconds;
-
- /**
- * token 续期检查
- */
- private Long detect;
-
- /**
- * 续期时间
- */
- private Long renew;
-}
diff --git a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/OSSConfigModel.java b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/OSSConfigModel.java
deleted file mode 100644
index 7acb41ea..00000000
--- a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/OSSConfigModel.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2021-2026 Odboy
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.odboy.framework.properties.model;
-
-import cn.odboy.base.KitObject;
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class OSSConfigModel extends KitObject {
-
- /**
- * 服务地址
- */
- private String endpoint;
- /**
- * 存储桶名称
- */
- private String bucketName;
- /**
- * Access Key
- */
- private String accessKey;
- /**
- * Secret Key
- */
- private String secretKey;
-}
diff --git a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/StorageOSSModel.java b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/StorageOSSModel.java
deleted file mode 100644
index 64486555..00000000
--- a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/StorageOSSModel.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2021-2026 Odboy
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.odboy.framework.properties.model;
-
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class StorageOSSModel {
-
- /**
- * 上传大小, 单位: M
- */
- private Long maxSize;
- private OSSConfigModel minio;
-}
diff --git a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/ThreadPoolSettingModel.java b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/ThreadPoolSettingModel.java
deleted file mode 100644
index 189ab2fb..00000000
--- a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/ThreadPoolSettingModel.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2021-2026 Odboy
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.odboy.framework.properties.model;
-
-import cn.odboy.base.KitObject;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 线程池 配置
- *
- * @author odboy
- * @date 2025-04-13
- */
-@Getter
-@Setter
-public class ThreadPoolSettingModel extends KitObject {
-
- /**
- * 核心线程池大小
- */
- private int corePoolSize;
- /**
- * 最大线程数
- */
- private int maxPoolSize;
- /**
- * 活跃时间
- */
- private int keepAliveSeconds;
- /**
- * 队列容量
- */
- private int queueCapacity;
-}
diff --git a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/UserLoginCaptchaSettingModel.java b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/UserLoginCaptchaSettingModel.java
deleted file mode 100644
index 2f2c1535..00000000
--- a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/UserLoginCaptchaSettingModel.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright 2021-2026 Odboy
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.odboy.framework.properties.model;
-
-import cn.hutool.core.util.StrUtil;
-import cn.odboy.base.KitObject;
-import cn.odboy.constant.CaptchaCodeEnum;
-import cn.odboy.framework.exception.BadRequestException;
-import com.wf.captcha.ArithmeticCaptcha;
-import com.wf.captcha.ChineseCaptcha;
-import com.wf.captcha.ChineseGifCaptcha;
-import com.wf.captcha.GifCaptcha;
-import com.wf.captcha.SpecCaptcha;
-import com.wf.captcha.base.Captcha;
-import java.awt.Font;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 验证码配置
- *
- * @author odboy
- */
-@Getter
-@Setter
-public class UserLoginCaptchaSettingModel extends KitObject {
-
- private CaptchaCodeEnum codeType;
-
- /**
- * 验证码有效期 分钟
- */
- private Long expiration = 5L;
-
- /**
- * 验证码内容长度
- */
- private int length = 4;
-
- /**
- * 验证码宽度
- */
- private int width = 111;
-
- /**
- * 验证码高度
- */
- private int height = 36;
-
- /**
- * 验证码字体
- */
- private String fontName;
-
- /**
- * 字体大小
- */
- private int fontSize = 25;
-
- /**
- * 依据配置信息生产验证码
- *
- * @return /
- */
- public Captcha getCaptcha() {
- Captcha captcha;
- switch (codeType) {
- case ARITHMETIC -> {
- // 算术类型 https://gitee.com/whvse/EasyCaptcha
- captcha = new FixedArithmeticCaptcha(width, height);
- // 几位数运算, 默认是两位
- captcha.setLen(length);
- }
- case CHINESE -> {
- captcha = new ChineseCaptcha(width, height);
- captcha.setLen(length);
- }
- case CHINESE_GIF -> {
- captcha = new ChineseGifCaptcha(width, height);
- captcha.setLen(length);
- }
- case GIF -> {
- captcha = new GifCaptcha(width, height);
- captcha.setLen(length);
- }
- case SPEC -> {
- captcha = new SpecCaptcha(width, height);
- captcha.setLen(length);
- }
- default -> throw new BadRequestException("验证码配置信息错误!正确配置查看 LoginCodeEnum ");
- }
- if (StrUtil.isNotBlank(fontName)) {
- captcha.setFont(new Font(fontName, Font.PLAIN, fontSize));
- }
- return captcha;
- }
-
- static class FixedArithmeticCaptcha extends ArithmeticCaptcha {
-
- public FixedArithmeticCaptcha(int width, int height) {
- super(width, height);
- }
-
- @Override
- protected char[] alphas() {
- // 生成随机数字和运算符
- int n1 = num(1, 10), n2 = num(1, 10);
- int opt = num(3);
-
- // 计算结果
- int res = new int[]{n1 + n2, n1 - n2, n1 * n2}[opt];
- // 转换为字符运算符
- char optChar = "+-x".charAt(opt);
-
- this.setArithmeticString(String.format("%s%c%s=?", n1, optChar, n2));
- this.chars = String.valueOf(res);
-
- return chars.toCharArray();
- }
- }
-}
diff --git a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/UserLoginSettingModel.java b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/UserLoginSettingModel.java
deleted file mode 100644
index 9e0df68b..00000000
--- a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/properties/model/UserLoginSettingModel.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2021-2026 Odboy
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package cn.odboy.framework.properties.model;
-
-import cn.odboy.base.KitObject;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 登录配置
- *
- * @author odboy
- */
-@Getter
-@Setter
-public class UserLoginSettingModel extends KitObject {
-
- /**
- * 账号单用户 登录
- */
- private boolean single = false;
- private UserLoginCaptchaSettingModel captchaSetting;
-}
diff --git a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/redis/KitRedisHelper.java b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/redis/KitRedisHelper.java
index c4963f0a..31d47249 100644
--- a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/redis/KitRedisHelper.java
+++ b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/redis/KitRedisHelper.java
@@ -20,15 +20,6 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSON;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.redis.connection.RedisConnection;
@@ -40,6 +31,15 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ScanOptions;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.stereotype.Component;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
@Component
public class KitRedisHelper {
@@ -280,7 +280,8 @@ public class KitRedisHelper {
if (value == null) {
return null;
}
- if (value instanceof List> list) {
+ if (value instanceof List>) {
+ List> list = (List>) value;
// 检查每个元素是否为指定类型
if (list.stream().allMatch(clazz::isInstance)) {
return list.stream().map(clazz::cast).collect(Collectors.toList());
diff --git a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/redis/RedisConfiguration.java b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/redis/RedisConfiguration.java
index dd0696f5..788295a9 100644
--- a/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/redis/RedisConfiguration.java
+++ b/cutejava-springboot3/cutejava-framework/src/main/java/cn/odboy/framework/redis/RedisConfiguration.java
@@ -13,22 +13,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package cn.odboy.framework.redis;
+import cn.odboy.framework.properties.AppProperties;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONFactory;
import com.alibaba.fastjson2.JSONWriter;
-import java.nio.charset.StandardCharsets;
-import java.time.Duration;
-import java.util.HashMap;
-import java.util.Map;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.MurmurHash3;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.cache.Cache;
+import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.interceptor.CacheErrorHandler;
import org.springframework.cache.interceptor.KeyGenerator;
@@ -43,19 +41,19 @@ import org.springframework.data.redis.serializer.RedisSerializationContext;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;
import org.springframework.data.redis.serializer.StringRedisSerializer;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import java.util.HashMap;
+import java.util.Map;
@Slf4j
@Configuration
@EnableCaching
@AutoConfigureBefore(RedisAutoConfiguration.class)
-public class RedisConfiguration {
+public class RedisConfiguration extends CachingConfigurerSupport {
- /**
- * 自动识别json对象白名单配置(仅允许解析的包名, 范围越小越安全) 未配置可能导致, 登录失败, 反复登录等问题
- */
- private static final String[] WHITELIST_STR =
- {"org.springframework", "cn.odboy.system.dal.dataobject", "cn.odboy.system.dal.model",
- "cn.odboy.task.dal.dataobject", "cn.odboy.task.dal.model",};
+ @Autowired
+ private AppProperties properties;
/**
* 设置 redis 数据默认过期时间,默认2小时 设置@cacheable 序列化方式
@@ -64,8 +62,7 @@ public class RedisConfiguration {
public RedisCacheConfiguration redisCacheConfiguration() {
FastJsonRedisSerializer