mirror of
https://git.ittx.com.cn/office-walle/will_server.git
synced 2026-10-19 16:16:57 +00:00
refactor(config): 重构配置文件结构和属性前缀
- 将AI相关配置从application.yml移至application-dev.yml和application-prod.yml - 移除application.yml中的xxl-job配置并分别在开发和生产环境中重新定义 - 更新XxlJobConfiguration中条件注解的属性前缀路径 - 调整ZentaoReportIntegrationProperties的配置前缀从will.agent.zentao.report改为will - 优化配置文件的环境特定设置分布
This commit is contained in:
@@ -16,7 +16,7 @@ import org.springframework.util.StringUtils;
|
||||
@Configuration
|
||||
@RequiredArgsConstructor
|
||||
@EnableConfigurationProperties(ZentaoReportIntegrationProperties.class)
|
||||
@ConditionalOnProperty(prefix = "will.agent.zentao.report.xxl-job", name = "enabled", havingValue = "true")
|
||||
@ConditionalOnProperty(prefix = "will.xxl-job", name = "enabled", havingValue = "true")
|
||||
public class XxlJobConfiguration {
|
||||
|
||||
private final ZentaoReportIntegrationProperties properties;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@Data
|
||||
@ConfigurationProperties(prefix = "will.agent.zentao.report")
|
||||
@ConfigurationProperties(prefix = "will")
|
||||
public class ZentaoReportIntegrationProperties {
|
||||
|
||||
private XxlJob xxlJob = new XxlJob();
|
||||
|
||||
@@ -1,7 +1,34 @@
|
||||
spring:
|
||||
ai:
|
||||
ollama:
|
||||
base-url: ${OLLAMA_BASE_URL:http://localhost:11434}
|
||||
chat:
|
||||
options:
|
||||
model: ${OLLAMA_MODEL:qwen2.5:7b}
|
||||
temperature: ${OLLAMA_TEMPERATURE:0.2}
|
||||
openai:
|
||||
api-key: ${OPENAI_API_KEY:}
|
||||
base-url: ${OPENAI_BASE_URL:https://api.openai.com}
|
||||
chat:
|
||||
options:
|
||||
model: ${OPENAI_MODEL:gpt-4o-mini}
|
||||
temperature: ${OPENAI_TEMPERATURE:0.2}
|
||||
zhipuai:
|
||||
api-key: ${ZHIPUAI_API_KEY:7980536e3ea04550b037db126899bb4f.QhE9ardDCIgT3SG3}
|
||||
base-url: ${ZHIPUAI_BASE_URL:https://open.bigmodel.cn/api/coding/paas/}
|
||||
chat:
|
||||
options:
|
||||
model: ${ZHIPUAI_MODEL:glm-4.7}
|
||||
temperature: ${ZHIPUAI_TEMPERATURE:0.2}
|
||||
mcp:
|
||||
client:
|
||||
enabled: true
|
||||
type: SYNC
|
||||
toolcallback:
|
||||
enabled: true
|
||||
request-timeout: 60s
|
||||
stdio:
|
||||
servers-configuration: classpath:mcp-servers.json
|
||||
rabbitmq:
|
||||
host: ${RABBITMQ_HOST:118.178.233.171}
|
||||
port: ${RABBITMQ_PORT:5672}
|
||||
@@ -39,6 +66,19 @@ spring:
|
||||
connection-timeout: 20000
|
||||
|
||||
will:
|
||||
xxl-job:
|
||||
enabled: ${XXL_JOB_ENABLED:true}
|
||||
admin-addresses: ${XXL_JOB_ADMIN_ADDRESSES:http://118.178.233.171:8081}
|
||||
admin-username: ${XXL_JOB_ADMIN_USERNAME:willsystem}
|
||||
admin-password: ${XXL_JOB_ADMIN_PASSWORD:Tt123456}
|
||||
access-token: ${XXL_JOB_ACCESS_TOKEN:x41TdRp1NDa75g}
|
||||
job-group-id: ${XXL_JOB_GROUP_ID:3}
|
||||
appname: ${XXL_JOB_APPNAME:will-system-agent}
|
||||
address: ${XXL_JOB_EXECUTOR_ADDRESS:}
|
||||
ip: ${XXL_JOB_EXECUTOR_IP:}
|
||||
port: ${XXL_JOB_EXECUTOR_PORT:9999}
|
||||
log-path: ${XXL_JOB_LOG_PATH:logs/xxl-job/jobhandler}
|
||||
log-retention-days: ${XXL_JOB_LOG_RETENTION_DAYS:30}
|
||||
queue:
|
||||
enabled: false
|
||||
agent:
|
||||
|
||||
@@ -1,4 +1,34 @@
|
||||
spring:
|
||||
ai:
|
||||
ollama:
|
||||
base-url: ${OLLAMA_BASE_URL:http://localhost:11434}
|
||||
chat:
|
||||
options:
|
||||
model: ${OLLAMA_MODEL:qwen2.5:7b}
|
||||
temperature: ${OLLAMA_TEMPERATURE:0.2}
|
||||
openai:
|
||||
api-key: ${OPENAI_API_KEY:}
|
||||
base-url: ${OPENAI_BASE_URL:https://api.openai.com}
|
||||
chat:
|
||||
options:
|
||||
model: ${OPENAI_MODEL:gpt-4o-mini}
|
||||
temperature: ${OPENAI_TEMPERATURE:0.2}
|
||||
zhipuai:
|
||||
api-key: ${ZHIPUAI_API_KEY}
|
||||
base-url: ${ZHIPUAI_BASE_URL:https://open.bigmodel.cn/api/coding/paas/}
|
||||
chat:
|
||||
options:
|
||||
model: ${ZHIPUAI_MODEL:glm-4.7}
|
||||
temperature: ${ZHIPUAI_TEMPERATURE:0.2}
|
||||
mcp:
|
||||
client:
|
||||
enabled: ${SPRING_AI_MCP_CLIENT_ENABLED:true}
|
||||
type: SYNC
|
||||
toolcallback:
|
||||
enabled: true
|
||||
request-timeout: 60s
|
||||
stdio:
|
||||
servers-configuration: classpath:mcp-servers.json
|
||||
rabbitmq:
|
||||
host: ${RABBITMQ_HOST}
|
||||
port: ${RABBITMQ_PORT:5672}
|
||||
@@ -36,6 +66,19 @@ spring:
|
||||
connection-timeout: 20000
|
||||
|
||||
will:
|
||||
xxl-job:
|
||||
enabled: ${XXL_JOB_ENABLED:true}
|
||||
admin-addresses: ${XXL_JOB_ADMIN_ADDRESSES}
|
||||
admin-username: ${XXL_JOB_ADMIN_USERNAME}
|
||||
admin-password: ${XXL_JOB_ADMIN_PASSWORD}
|
||||
access-token: ${XXL_JOB_ACCESS_TOKEN}
|
||||
job-group-id: ${XXL_JOB_GROUP_ID:3}
|
||||
appname: ${XXL_JOB_APPNAME:will-system-agent}
|
||||
address: ${XXL_JOB_EXECUTOR_ADDRESS:}
|
||||
ip: ${XXL_JOB_EXECUTOR_IP:}
|
||||
port: ${XXL_JOB_EXECUTOR_PORT:9999}
|
||||
log-path: ${XXL_JOB_LOG_PATH:logs/xxl-job/jobhandler}
|
||||
log-retention-days: ${XXL_JOB_LOG_RETENTION_DAYS:30}
|
||||
queue:
|
||||
enabled: ${WILL_QUEUE_ENABLED:false}
|
||||
agent:
|
||||
@@ -47,4 +90,4 @@ will:
|
||||
password: ${ZENTAO_DB_PASSWORD}
|
||||
maximum-pool-size: ${ZENTAO_DB_MAXIMUM_POOL_SIZE:5}
|
||||
minimum-idle: ${ZENTAO_DB_MINIMUM_IDLE:1}
|
||||
connection-timeout: 10000
|
||||
connection-timeout: 10000
|
||||
|
||||
@@ -1,36 +1,6 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: ${SPRING_PROFILES_ACTIVE:dev}
|
||||
ai:
|
||||
ollama:
|
||||
base-url: ${OLLAMA_BASE_URL:http://localhost:11434}
|
||||
chat:
|
||||
options:
|
||||
model: ${OLLAMA_MODEL:qwen2.5:7b}
|
||||
temperature: ${OLLAMA_TEMPERATURE:0.2}
|
||||
openai:
|
||||
api-key: ${OPENAI_API_KEY:}
|
||||
base-url: ${OPENAI_BASE_URL:https://api.openai.com}
|
||||
chat:
|
||||
options:
|
||||
model: ${OPENAI_MODEL:gpt-4o-mini}
|
||||
temperature: ${OPENAI_TEMPERATURE:0.2}
|
||||
zhipuai:
|
||||
api-key: ${ZHIPUAI_API_KEY:}
|
||||
base-url: ${ZHIPUAI_BASE_URL:https://open.bigmodel.cn/api/coding/paas/}
|
||||
chat:
|
||||
options:
|
||||
model: ${ZHIPUAI_MODEL:glm-4.7}
|
||||
temperature: ${ZHIPUAI_TEMPERATURE:0.2}
|
||||
mcp:
|
||||
client:
|
||||
enabled: true
|
||||
type: SYNC
|
||||
toolcallback:
|
||||
enabled: true
|
||||
request-timeout: 60s
|
||||
stdio:
|
||||
servers-configuration: classpath:mcp-servers.json
|
||||
|
||||
will:
|
||||
agent:
|
||||
@@ -42,20 +12,6 @@ will:
|
||||
enabled: true
|
||||
zentao:
|
||||
enabled: true
|
||||
report:
|
||||
xxl-job:
|
||||
enabled: ${XXL_JOB_ENABLED:true}
|
||||
admin-addresses: ${XXL_JOB_ADMIN_ADDRESSES:http://118.178.233.171:8081}
|
||||
admin-username: ${XXL_JOB_ADMIN_USERNAME:willsystem}
|
||||
admin-password: ${XXL_JOB_ADMIN_PASSWORD:}
|
||||
access-token: ${XXL_JOB_ACCESS_TOKEN:}
|
||||
job-group-id: ${XXL_JOB_GROUP_ID:3}
|
||||
appname: ${XXL_JOB_APPNAME:will-system-agent}
|
||||
address: ${XXL_JOB_EXECUTOR_ADDRESS:}
|
||||
ip: ${XXL_JOB_EXECUTOR_IP:}
|
||||
port: ${XXL_JOB_EXECUTOR_PORT:9999}
|
||||
log-path: ${XXL_JOB_LOG_PATH:logs/xxl-job/jobhandler}
|
||||
log-retention-days: ${XXL_JOB_LOG_RETENTION_DAYS:30}
|
||||
|
||||
sa-token:
|
||||
token-name: satoken
|
||||
@@ -72,4 +28,4 @@ mybatis-plus:
|
||||
map-underscore-to-camel-case: true
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
typeAliasesPackage: com.will.coreData.entity
|
||||
mapperLocations: classpath:mapper/**/*.xml
|
||||
mapperLocations: classpath:mapper/**/*.xml
|
||||
|
||||
Reference in New Issue
Block a user