2025-12-19 15:52:48 +08:00
|
|
|
|
# ================== Server ==================
|
|
|
|
|
|
server:
|
|
|
|
|
|
port: 8090
|
|
|
|
|
|
# servlet:
|
|
|
|
|
|
# context-path: /urban-lifeline/agent
|
|
|
|
|
|
|
|
|
|
|
|
# ================== Auth ====================
|
|
|
|
|
|
auth:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
gateway-mode: true
|
|
|
|
|
|
whitelist:
|
|
|
|
|
|
- /swagger-ui/**
|
|
|
|
|
|
- /swagger-ui.html
|
|
|
|
|
|
- /v3/api-docs/**
|
|
|
|
|
|
- /webjars/**
|
|
|
|
|
|
- /favicon.ico
|
|
|
|
|
|
- /error
|
|
|
|
|
|
- /actuator/health
|
|
|
|
|
|
- /actuator/info
|
2025-12-23 15:57:11 +08:00
|
|
|
|
- /ai/chat/** # AI对话,有非系统用户对话的接口,无登录状态
|
2025-12-19 15:52:48 +08:00
|
|
|
|
|
|
|
|
|
|
security:
|
|
|
|
|
|
aes:
|
|
|
|
|
|
# AES-256 密钥(Base64编码,必须与所有服务保持一致)
|
|
|
|
|
|
# 警告:这是开发环境密钥,生产环境请使用密钥管理系统
|
|
|
|
|
|
secret-key: MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=
|
|
|
|
|
|
|
|
|
|
|
|
# ================== Spring ==================
|
|
|
|
|
|
spring:
|
|
|
|
|
|
application:
|
|
|
|
|
|
name: ai-service
|
2025-12-30 18:38:24 +08:00
|
|
|
|
# 文件上传配置
|
|
|
|
|
|
servlet:
|
|
|
|
|
|
multipart:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
max-file-size: 500MB
|
|
|
|
|
|
max-request-size: 500MB
|
2025-12-19 15:52:48 +08:00
|
|
|
|
# ================== Spring Cloud Nacos ==================
|
|
|
|
|
|
cloud:
|
|
|
|
|
|
nacos:
|
|
|
|
|
|
discovery:
|
|
|
|
|
|
server-addr: 127.0.0.1:8848
|
|
|
|
|
|
namespace: dev
|
|
|
|
|
|
group: DEFAULT_GROUP
|
|
|
|
|
|
|
|
|
|
|
|
# ================== DataSource ==================
|
|
|
|
|
|
datasource:
|
|
|
|
|
|
url: jdbc:postgresql://127.0.0.1:5432/urban_lifeline
|
|
|
|
|
|
username: postgres
|
|
|
|
|
|
password: postgres
|
|
|
|
|
|
driver-class-name: org.postgresql.Driver
|
|
|
|
|
|
|
|
|
|
|
|
# ================== Redis ==================
|
|
|
|
|
|
data:
|
|
|
|
|
|
redis:
|
|
|
|
|
|
host: 127.0.0.1
|
|
|
|
|
|
port: 6379
|
|
|
|
|
|
database: 0
|
|
|
|
|
|
# password: ""
|
|
|
|
|
|
|
|
|
|
|
|
# ================== SpringDoc ==================
|
|
|
|
|
|
springdoc:
|
|
|
|
|
|
api-docs:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
path: /v3/api-docs
|
|
|
|
|
|
swagger-ui:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
path: /swagger-ui.html
|
|
|
|
|
|
group-configs:
|
|
|
|
|
|
- group: 'default'
|
|
|
|
|
|
display-name: 'AI代理服务 API'
|
|
|
|
|
|
paths-to-match: '/**'
|
|
|
|
|
|
|
|
|
|
|
|
# ================== Dubbo + Nacos ==================
|
|
|
|
|
|
dubbo:
|
|
|
|
|
|
application:
|
|
|
|
|
|
name: urban-lifeline-agent
|
|
|
|
|
|
qos-enable: false
|
|
|
|
|
|
protocol:
|
2025-12-30 18:38:24 +08:00
|
|
|
|
payload: 110100480
|
2025-12-19 15:52:48 +08:00
|
|
|
|
name: dubbo
|
|
|
|
|
|
port: -1
|
|
|
|
|
|
registry:
|
|
|
|
|
|
address: nacos://127.0.0.1:8848
|
|
|
|
|
|
scan:
|
|
|
|
|
|
base-packages: org.xyzh.ai.service.impl
|
|
|
|
|
|
|
|
|
|
|
|
# ================== MyBatis ==================
|
|
|
|
|
|
mybatis-plus:
|
|
|
|
|
|
mapper-locations: classpath:mapper/**/*.xml
|
|
|
|
|
|
type-aliases-package: org.xyzh.common.dto, org.xyzh.api
|
2025-12-23 13:27:36 +08:00
|
|
|
|
logging:
|
|
|
|
|
|
config: classpath:log4j2.xml
|
|
|
|
|
|
charset:
|
|
|
|
|
|
console: UTF-8
|
|
|
|
|
|
file: UTF-8
|
|
|
|
|
|
level:
|
|
|
|
|
|
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping: TRACE
|