mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-03 06:53:45 +08:00
Merge remote-tracking branch 'upstream/v3.0.0' into v3.0.0-deploy
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package org.ruoyi.config;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* BeanDefinitionRegistry后置处理器
|
||||
* 解决 MapStruct Plus 生成的 mapper 冲突问题
|
||||
*
|
||||
* @author ruoyi team
|
||||
*/
|
||||
@Configuration
|
||||
public class MapperConflictResolver implements BeanDefinitionRegistryPostProcessor {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(MapperConflictResolver.class);
|
||||
|
||||
@Override
|
||||
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
|
||||
String[] beanNames = registry.getBeanDefinitionNames();
|
||||
|
||||
// 查找冲突的 mapper bean
|
||||
for (String beanName : beanNames) {
|
||||
if (beanName.equals("chatMessageBoToChatMessageMapperImpl")) {
|
||||
BeanDefinition beanDefinition = registry.getBeanDefinition(beanName);
|
||||
String beanClassName = beanDefinition.getBeanClassName();
|
||||
|
||||
log.info("Found mapper bean: {} -> {}", beanName, beanClassName);
|
||||
|
||||
// 如果是 org.ruoyi.domain.bo.chat 包下的(冲突的),移除它
|
||||
if (beanClassName != null && beanClassName.startsWith("org.ruoyi.domain.bo.chat")) {
|
||||
log.warn("Removing conflicting bean definition: {} ({})", beanName, beanClassName);
|
||||
registry.removeBeanDefinition(beanName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
|
||||
// 不需要实现
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,9 @@ security:
|
||||
- /*/api-docs/**
|
||||
- /warm-flow-ui/config
|
||||
- /workflow/run
|
||||
|
||||
- /user/qrcode
|
||||
- /user/login/qrcode
|
||||
- /weixin/check
|
||||
# 多租户配置
|
||||
tenant:
|
||||
# 是否开启
|
||||
@@ -216,6 +218,8 @@ springdoc:
|
||||
packages-to-scan: org.ruoyi.generator
|
||||
- group: 5.工作流模块
|
||||
packages-to-scan: org.ruoyi.workflow
|
||||
- group: 6.MCP模块
|
||||
packages-to-scan: org.ruoyi.mcp
|
||||
|
||||
# 防止XSS攻击
|
||||
xss:
|
||||
@@ -307,6 +311,7 @@ wechat:
|
||||
secret: ''
|
||||
token: ''
|
||||
aesKey: ''
|
||||
|
||||
--- # Neo4j 知识图谱配置
|
||||
neo4j:
|
||||
uri: bolt://117.72.192.162:7687
|
||||
@@ -357,3 +362,14 @@ knowledge:
|
||||
cache-enabled: true
|
||||
# 缓存过期时间(分钟)
|
||||
cache-expire-minutes: 60
|
||||
|
||||
--- # MCP 模块配置
|
||||
app:
|
||||
mcp:
|
||||
client:
|
||||
# 请求超时时间(秒)
|
||||
request-timeout: 30
|
||||
# 连接超时时间(秒)
|
||||
connection-timeout: 10
|
||||
# 最大重试次数
|
||||
max-retries: 3
|
||||
|
||||
Reference in New Issue
Block a user