【代码优化】AI:移除 bootstrap.yaml,和 boot 保持一致

This commit is contained in:
YunaiV
2024-07-14 18:50:59 +08:00
parent ee7cde1b03
commit f52ea83b30
6 changed files with 53 additions and 40 deletions

View File

@@ -1,8 +1,19 @@
spring:
application:
name: ai-server
profiles:
active: local
main:
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
config:
import:
- optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
# Servlet 配置
servlet:
# 文件上传相关配置项
@@ -25,12 +36,17 @@ spring:
time-to-live: 1h # 设置过期时间为 1 小时
server:
port: 48090
servlet:
encoding:
enabled: true
charset: UTF-8 # 必须设置 UTF-8避免 WebFlux 流式返回AI 场景)会乱码问题
force: true
logging:
file:
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
--- #################### 接口文档配置 ####################
springdoc: