spring: application: name: xlcp-server # 排除微信自动配置(不需要社交登录功能) autoconfigure: exclude: - com.binarywang.spring.starter.wxjava.mp.config.WxMpAutoConfiguration # 数据源配置(使用新建的 MySQL 容器) datasource: dynamic: datasource: master: # 使用 Docker 服务名连接 MySQL url: jdbc:mysql://mysql:3306/xlcp?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&useUnicode=true&characterEncoding=utf8 username: root password: ${MYSQL_ROOT_PASSWORD:-Xlcp@2025#Secure} driver-class-name: com.mysql.cj.jdbc.Driver slave: # 从库配置(可选,如果不需要可以删除或保持与主库相同) url: jdbc:mysql://mysql:3306/xlcp?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&useUnicode=true&characterEncoding=utf8 username: root password: ${MYSQL_ROOT_PASSWORD:-Xlcp@2025#Secure} driver-class-name: com.mysql.cj.jdbc.Driver hikari: # 连接池配置 maximum-pool-size: 20 minimum-idle: 5 idle-timeout: 600000 connection-timeout: 30000 max-lifetime: 1800000 pool-name: PrisonHikariCP # 连接健康检测 connection-test-query: SELECT 1 # Redis 配置(使用新建的 Redis 容器) data: redis: host: redis port: 6379 password: ${REDIS_PASSWORD:-Xlcp2025Redis} database: 0 timeout: 10000ms lettuce: pool: max-active: 20 max-wait: -1ms max-idle: 10 min-idle: 0 shutdown-timeout: 100ms # 文件上传配置 servlet: multipart: enabled: true max-file-size: 100MB max-request-size: 100MB file-size-threshold: 2KB # Jackson 配置 jackson: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8 serialization: write-dates-as-timestamps: false # 服务器配置 server: port: 48080 servlet: context-path: / compression: enabled: true mime-types: application/json,application/xml,text/html,text/xml,text/plain error: include-message: always include-binding-errors: always # 应用配置 app: name: XL监狱综合管理平台 version: 1.0.0 # 验证码配置 captcha: enabled: true type: math # 文件上传配置 upload: path: ./data/upload avatar-path: ./data/upload/avatar cache-path: ./data/upload/cache # XSS 过滤配置 security: xss: enabled: true exclude-urls: - /admin/ck/uploadImage - /admin/oss/uploadToAliCloudV2 - /admin/oss/uploadToTencentCloudV2 # 日志配置 logging: level: root: INFO cn.iocoder.yudao: DEBUG cn.iocoder.yudao.module.prison: DEBUG file: name: logs/yudao-server.log logback: rollingpolicy: max-history: 30 max-file-size: 100MB total-size-cap: 3GB # MyBatis Plus 配置 mybatis-plus: mapper-locations: classpath*:mapper/**/*.xml type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject global-config: db-config: id-type: auto logic-delete-field: deleted logic-delete-value: 1 logic-not-delete-value: 0 banner: false configuration: map-underscore-to-camel-case: true cache-enabled: false log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # Actuator 监控配置 management: endpoints: web: exposure: include: health,info,metrics,prometheus base-path: /actuator endpoint: health: show-details: always metrics: tags: application: ${spring.application.name} # LLM 配置(用于危险评估智能分析) llm: local: base-url: ${LLM_BASE_URL:http://127.0.0.1:2100/v1} api-key: ${LLM_API_KEY:} model: ${LLM_MODEL:qwen3} timeout-seconds: ${LLM_TIMEOUT:120} # 微信公众号配置 wx: mp: app-id: wxf56b1542b9e85f8a secret: 496379dcef1ba869e9234de8d598cfd3 config-storage: type: RedisTemplate key-prefix: wx http-client-type: HttpClient miniapp: appid: wxc4598c446f8a9cb3 secret: 4a1a04e07f6a4a0751b39c3064a92c8b config-storage: type: RedisTemplate key-prefix: wa http-client-type: HttpClient