docs 补充项目注释

This commit is contained in:
AprilWind
2026-06-01 10:48:09 +08:00
parent f3ed8e82a7
commit 941c0b9032
73 changed files with 531 additions and 1 deletions
+24
View File
@@ -16,29 +16,53 @@
</description>
<modules>
<!-- common依赖项 -->
<module>ruoyi-common-bom</module>
<!-- 授权认证 -->
<module>ruoyi-common-social</module>
<!-- 核心模块 -->
<module>ruoyi-common-core</module>
<!-- 接口模块 -->
<module>ruoyi-common-doc</module>
<!-- excel -->
<module>ruoyi-common-excel</module>
<!-- 调度模块 -->
<module>ruoyi-common-job</module>
<!-- 日志记录 -->
<module>ruoyi-common-log</module>
<!-- 邮件服务 -->
<module>ruoyi-common-mail</module>
<!-- 数据库服务 -->
<module>ruoyi-common-mybatis</module>
<!-- OSS -->
<module>ruoyi-common-oss</module>
<!-- 缓存服务 -->
<module>ruoyi-common-redis</module>
<!-- satoken -->
<module>ruoyi-common-satoken</module>
<!-- 安全模块 -->
<module>ruoyi-common-security</module>
<!-- 短信模块 -->
<module>ruoyi-common-sms</module>
<!-- ES搜索引擎服务 -->
<module>ruoyi-common-elasticsearch</module>
<!-- web服务 -->
<module>ruoyi-common-web</module>
<!-- 翻译模块 -->
<module>ruoyi-common-translation</module>
<!-- 脱敏模块 -->
<module>ruoyi-common-sensitive</module>
<!-- 序列化模块 -->
<module>ruoyi-common-json</module>
<!-- 数据库加解密模块 -->
<module>ruoyi-common-encrypt</module>
<!-- 消息推送模块 -->
<module>ruoyi-common-push</module>
<!-- mqtt模块 -->
<module>ruoyi-common-mqtt</module>
<!-- ai模块 -->
<module>ruoyi-common-ai</module>
<!-- mcp模块 -->
<module>ruoyi-common-mcp</module>
</modules>
+3
View File
@@ -17,16 +17,19 @@
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<!-- Snail AI Agent 启动器 -->
<dependency>
<groupId>com.aizuda</groupId>
<artifactId>snail-ai-agent-starter</artifactId>
</dependency>
<!-- Snail AI OpenAPI 启动器 -->
<dependency>
<groupId>com.aizuda</groupId>
<artifactId>snail-ai-openapi-starter</artifactId>
+7
View File
@@ -34,6 +34,7 @@
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- AOP 切面 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aspectj</artifactId>
@@ -51,21 +52,25 @@
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<!-- Hutool 核心工具 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
</dependency>
<!-- Hutool HTTP 工具 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-http</artifactId>
</dependency>
<!-- Hutool 扩展工具 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-extra</artifactId>
</dependency>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
@@ -77,12 +82,14 @@
<artifactId>spring-boot-configuration-processor</artifactId>
</dependency>
<!-- Spring Boot 配置迁移 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-properties-migrator</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Mapstruct Plus -->
<dependency>
<groupId>io.github.linpeilie</groupId>
<artifactId>mapstruct-plus-spring-boot-starter</artifactId>
@@ -33,8 +33,14 @@ public @interface DictPattern {
*/
String message() default "字典值无效";
/**
* Bean Validation 分组。
*/
Class<?>[] groups() default {};
/**
* Bean Validation 负载信息。
*/
Class<? extends Payload>[] payload() default {};
}
@@ -32,16 +32,32 @@ public @interface EnumPattern {
*/
String fieldName();
/**
* 校验失败时返回的错误消息。
*/
String message() default "输入值不在枚举范围内";
/**
* Bean Validation 分组。
*/
Class<?>[] groups() default {};
/**
* Bean Validation 负载信息。
*/
Class<? extends Payload>[] payload() default {};
/**
* 支持在同一元素上重复声明多个枚举校验规则。
*/
@Documented
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
@interface List {
/**
* 重复声明的枚举校验规则集合。
*/
EnumPattern[] value();
}
@@ -17,10 +17,19 @@ import java.lang.annotation.Target;
@Constraint(validatedBy = {XssValidator.class})
public @interface Xss {
/**
* 校验失败时返回的错误消息。
*/
String message() default "不允许任何脚本运行";
/**
* Bean Validation 分组。
*/
Class<?>[] groups() default {};
/**
* Bean Validation 负载信息。
*/
Class<? extends Payload>[] payload() default {};
}
+5
View File
@@ -16,26 +16,31 @@
</description>
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<!-- Web 服务器抽象 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-web-server</artifactId>
</dependency>
<!-- 接口文档 -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
</dependency>
<!-- JavaDoc 运行时读取 -->
<dependency>
<groupId>com.github.therapi</groupId>
<artifactId>therapi-runtime-javadoc</artifactId>
</dependency>
<!-- Jackson Kotlin 模块 -->
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
@@ -16,6 +16,7 @@
</description>
<dependencies>
<!-- Easy-Es 搜索引擎 -->
<dependency>
<groupId>org.dromara.easy-es</groupId>
<artifactId>easy-es-boot-starter</artifactId>
@@ -17,26 +17,31 @@
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<!-- 加密包引入 -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
</dependency>
<!-- Hutool 加密工具 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-crypto</artifactId>
</dependency>
<!-- Spring WebMVC -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<!-- MyBatis Plus 启动器 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot4-starter</artifactId>
+2
View File
@@ -16,11 +16,13 @@
</description>
<dependencies>
<!-- 序列化模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-json</artifactId>
</dependency>
<!-- excel -->
<dependency>
<groupId>org.apache.fesod</groupId>
<artifactId>fesod-sheet</artifactId>
+4
View File
@@ -17,6 +17,7 @@
<dependencies>
<!-- Spring Boot 自动配置 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
@@ -27,16 +28,19 @@
<groupId>com.aizuda</groupId>
<artifactId>snail-job-client-starter</artifactId>
</dependency>
<!-- SnailJob 任务核心 -->
<dependency>
<groupId>com.aizuda</groupId>
<artifactId>snail-job-client-job-core</artifactId>
</dependency>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!-- 核心模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
@@ -24,6 +24,11 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@EnableSnailJob
public class SnailJobConfig {
/**
* Snail Job 客户端启动时挂载远程日志 appender。
*
* @param event 客户端启动事件
*/
@EventListener(SnailClientStartingEvent.class)
public void onStarting(SnailClientStartingEvent event) {
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
+2
View File
@@ -16,11 +16,13 @@
</description>
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<!-- Jackson 序列化 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jackson</artifactId>
@@ -14,6 +14,13 @@ import java.util.List;
@AutoConfiguration
public class JsonEnhancementConfig {
/**
* 创建 JSON 字段增强处理器入口。
*
* @param jsonMapper JSON 映射器
* @param processors 字段处理器集合
* @return JSON 值增强器
*/
@Bean
public JsonValueEnhancer jsonValueEnhancer(JsonMapper jsonMapper, List<JsonFieldProcessor> processors) {
return new JsonValueEnhancer(jsonMapper, processors);
@@ -26,8 +26,14 @@ public @interface JsonPattern {
*/
String message() default "不是有效的 JSON 格式";
/**
* Bean Validation 分组。
*/
Class<?>[] groups() default {};
/**
* Bean Validation 负载信息。
*/
Class<? extends Payload>[] payload() default {};
}
+3
View File
@@ -17,16 +17,19 @@
<dependencies>
<!-- satoken -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-satoken</artifactId>
</dependency>
<!-- 序列化模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-json</artifactId>
</dependency>
<!-- api模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-api</artifactId>
+3
View File
@@ -16,15 +16,18 @@
</description>
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<!-- 邮件接口 -->
<dependency>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
</dependency>
<!-- 邮件实现 -->
<dependency>
<groupId>org.eclipse.angus</groupId>
<artifactId>jakarta.mail</artifactId>
+3
View File
@@ -16,16 +16,19 @@
</description>
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<!-- MCP 服务端 -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
</dependency>
<!-- MCP 客户端 -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-mcp-client</artifactId>
@@ -14,6 +14,13 @@ public record McpResourceReadResult(
List<McpSchema.ResourceContents> contents
) {
/**
* 将 MCP SDK 资源读取结果转换为带服务端名称的项目结果对象。
*
* @param serverName MCP 服务端名称
* @param result MCP SDK 资源读取结果
* @return MCP 资源读取结果
*/
public static McpResourceReadResult of(String serverName, McpSchema.ReadResourceResult result) {
return new McpResourceReadResult(serverName, result.contents());
}
@@ -16,6 +16,13 @@ public record McpToolCallResult(
Object structuredContent
) {
/**
* 将 MCP SDK 工具调用结果转换为带服务端名称的项目结果对象。
*
* @param serverName MCP 服务端名称
* @param result MCP SDK 工具调用结果
* @return MCP 工具调用结果
*/
public static McpToolCallResult of(String serverName, McpSchema.CallToolResult result) {
return new McpToolCallResult(
serverName,
+3
View File
@@ -16,16 +16,19 @@
</description>
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<!-- 序列化模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-json</artifactId>
</dependency>
<!-- mqtt客户端 -->
<dependency>
<groupId>org.dromara.mica-mqtt</groupId>
<artifactId>mica-mqtt-client-spring-boot-starter</artifactId>
@@ -31,11 +31,22 @@ import java.util.concurrent.TimeUnit;
@ConditionalOnProperty(value = "mqtt.client.enabled", havingValue = "true")
public class MqttAutoConfiguration {
/**
* 创建 MQTT 客户端连接监听器。
*
* @param mqttClientCreator MQTT 客户端创建器
* @return MQTT 客户端连接监听器
*/
@Bean
public MqttClientConnectListener mqttClientConnectListener(MqttClientCreator mqttClientCreator) {
return new MqttClientConnectListener(mqttClientCreator);
}
/**
* 创建 MQTT 全局消息监听器。
*
* @return MQTT 全局消息监听器
*/
@Bean
public MqttClientGlobalMessageListener mqttClientGlobalMessageListener() {
return new MqttClientGlobalMessageListener();
@@ -16,16 +16,19 @@
</description>
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<!-- satoken -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-satoken</artifactId>
</dependency>
<!-- api模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-api</artifactId>
@@ -37,16 +40,19 @@
<artifactId>dynamic-datasource-spring-boot4-starter</artifactId>
</dependency>
<!-- MyBatis Plus 启动器 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot4-starter</artifactId>
</dependency>
<!-- MyBatis Plus JSqlParser 支持 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser</artifactId>
</dependency>
<!-- MyBatis Plus Join -->
<dependency>
<groupId>com.github.yulichang</groupId>
<artifactId>mybatis-plus-join-boot-starter</artifactId>
@@ -143,6 +143,12 @@ public class MPJSqlInjector extends DefaultSqlInjector {
TableHelper.init(modelClass, supplier.get());
}
/**
* 兼容旧版泛型解析逻辑,提取 Mapper 绑定的实体类型。
*
* @param mapperClass Mapper 类型
* @return Mapper 泛型中的实体类型,无法解析时返回 null
*/
@SuppressWarnings("IfStatementWithIdenticalBranches")
protected Class<?> extractModelClassOld(Class<?> mapperClass) {
Type[] types = mapperClass.getGenericInterfaces();
@@ -32,6 +32,11 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@PropertySource(value = "classpath:common-mybatis.yml", factory = YmlPropertySourceFactory.class)
public class MybatisPlusConfig {
/**
* 组装 MyBatis-Plus 核心拦截器链。
*
* @return MyBatis-Plus 拦截器
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+2
View File
@@ -16,11 +16,13 @@
</description>
<dependencies>
<!-- 序列化模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-json</artifactId>
</dependency>
<!-- 缓存服务 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-redis</artifactId>
@@ -31,6 +31,21 @@ public record GetObjectResult(
Map<String, String> metadata
) {
/**
* 构建文件对象获取结果。
*
* @param key 对象 Key
* @param eTag 对象 ETag
* @param lastModified 最后修改时间
* @param size 对象大小
* @param contentType 内容类型
* @param contentDisposition 内容处置方式
* @param contentRange 内容范围
* @param contentEncoding 内容编码
* @param contentLanguage 内容语言
* @param metadata 自定义元数据
* @return 文件对象获取结果
*/
public static GetObjectResult form(String key, String eTag, LocalDateTime lastModified, long size
, String contentType, String contentDisposition, String contentRange, String contentEncoding, String contentLanguage
, Map<String, String> metadata) {
+6
View File
@@ -16,26 +16,32 @@
</description>
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<!-- 缓存服务 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-redis</artifactId>
</dependency>
<!-- satoken -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-satoken</artifactId>
</dependency>
<!-- 序列化模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-json</artifactId>
</dependency>
<!-- api模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-api</artifactId>
</dependency>
<!-- WebSocket 服务 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
+7
View File
@@ -22,6 +22,7 @@
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<!-- 序列化模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-json</artifactId>
@@ -33,32 +34,38 @@
<artifactId>redisson-spring-boot-starter</artifactId>
</dependency>
<!-- Redisson 缓存 -->
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-cache</artifactId>
<version>${redisson.version}</version>
</dependency>
<!-- 分布式锁 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>lock4j-redisson-spring-boot-starter</artifactId>
</dependency>
<!-- 本地缓存 -->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
</dependency>
<!-- Jackson Databind -->
<dependency>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- Hutool 加密工具 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-crypto</artifactId>
</dependency>
<!-- Sa-Token 核心 -->
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-core</artifactId>
@@ -19,6 +19,9 @@ public @interface RepeatSubmit {
*/
int interval() default 5000;
/**
* 重复提交间隔时间单位。
*/
TimeUnit timeUnit() default TimeUnit.MILLISECONDS;
/**
@@ -50,6 +50,12 @@ public class RateLimiterAspect {
private final ParameterNameDiscoverer pnd = new DefaultParameterNameDiscoverer();
/**
* 在限流注解方法执行前扣减令牌,令牌不足时阻断请求。
*
* @param point 切点信息
* @param rateLimiter 限流注解配置
*/
@Before("@annotation(rateLimiter)")
public void doBefore(JoinPoint point, RateLimiter rateLimiter) {
int time = rateLimiter.time();
@@ -13,6 +13,11 @@ import org.springframework.data.redis.connection.RedisConfiguration;
@AutoConfiguration(after = RedisConfiguration.class)
public class IdempotentConfig {
/**
* 创建重复提交切面。
*
* @return 重复提交切面
*/
@Bean
public RepeatSubmitAspect repeatSubmitAspect() {
return new RepeatSubmitAspect();
@@ -6,12 +6,19 @@ import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.RedisConfiguration;
/**
* 限流功能配置。
*
* @author guangxin
* @date 2023/1/18
*/
@AutoConfiguration(after = RedisConfiguration.class)
public class RateLimiterConfig {
/**
* 创建限流切面。
*
* @return 限流切面
*/
@Bean
public RateLimiterAspect rateLimiterAspect() {
return new RateLimiterAspect();
@@ -13,6 +13,7 @@
<dependencies>
<!-- 核心模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
@@ -24,6 +25,7 @@
<artifactId>ruoyi-common-redis</artifactId>
</dependency>
<!-- api模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-api</artifactId>
@@ -53,6 +55,7 @@
</exclusions>
</dependency>
<!-- 本地缓存 -->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
@@ -16,6 +16,7 @@
</description>
<dependencies>
<!-- satoken -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-satoken</artifactId>
@@ -16,6 +16,7 @@
</description>
<dependencies>
<!-- 序列化模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-json</artifactId>
@@ -10,6 +10,11 @@ import org.springframework.context.annotation.Bean;
@AutoConfiguration
public class SensitiveConfig {
/**
* 创建脱敏 JSON 字段处理器。
*
* @return 脱敏 JSON 字段处理器
*/
@Bean
public SensitiveJsonFieldProcessor sensitiveJsonFieldProcessor() {
return new SensitiveJsonFieldProcessor();
@@ -105,8 +105,16 @@ public enum SensitiveStrategy {
//可自行添加其他脱敏策略
/**
* 当前策略对应的脱敏函数。
*/
private final Function<String, String> desensitizer;
/**
* 获取当前策略对应的脱敏函数。
*
* @return 脱敏函数
*/
public Function<String, String> desensitizer() {
return desensitizer;
}
+1
View File
@@ -17,6 +17,7 @@
<dependencies>
<!-- 短信模块 -->
<dependency>
<groupId>org.dromara.sms4j</groupId>
<artifactId>sms4j-spring-boot-starter</artifactId>
@@ -16,6 +16,11 @@ import org.springframework.context.annotation.Primary;
@AutoConfiguration(after = {DataRedisAutoConfiguration.class})
public class SmsAutoConfiguration {
/**
* 创建 sms4j 使用的短信缓存访问对象。
*
* @return 短信缓存访问对象
*/
@Primary
@Bean
public SmsDao smsDao() {
+3
View File
@@ -16,16 +16,19 @@
</description>
<dependencies>
<!-- 授权认证 -->
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
</dependency>
<!-- 序列化模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-json</artifactId>
</dependency>
<!-- 缓存服务 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-redis</artifactId>
@@ -17,11 +17,13 @@
<dependencies>
<!-- 序列化模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-json</artifactId>
</dependency>
<!-- api模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-api</artifactId>
@@ -15,6 +15,12 @@ import java.util.List;
@AutoConfiguration
public class TranslationConfig {
/**
* 创建翻译 JSON 字段处理器。
*
* @param list 翻译实现集合
* @return 翻译 JSON 字段处理器
*/
@Bean
public TranslationJsonFieldProcessor translationJsonFieldProcessor(List<TranslationInterface<?>> list) {
return new TranslationJsonFieldProcessor(list);
+4
View File
@@ -16,6 +16,7 @@
</description>
<dependencies>
<!-- 序列化模块 -->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-json</artifactId>
@@ -38,16 +39,19 @@
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<!-- 监控端点 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- 图形验证码 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-captcha</artifactId>
</dependency>
<!-- Hutool 加密工具 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-crypto</artifactId>