application.yml
2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#配置日志
logging:
config : classpath:logback-spring.xml
dirpath: D:/xlyweberp/logs/xlyAi
level:
root: info
com.xly: debug
org.springframework: warn
dev.langchain4j: DEBUG
server:
port: 8099
servlet:
context-path: /xlyAi
encoding:
charset: UTF-8
enabled: true
spring:
application:
name: xlyAi
version: 1.0.0
thymeleaf:
prefix: classpath:/templates/
suffix: .html
mode: HTML
encoding: UTF-8
cache: false # 开发时关闭缓存
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
# 连接串与口令一律来自环境变量(DB_URL/DB_USERNAME/DB_PASSWORD)——仓库里不放任何生产凭据。
# 单语句执行:allowMultiQueries 关闭,堆叠语句在驱动层就被拒。
url: ${DB_URL:jdbc:mysql://127.0.0.1:33307/xlyweberp_saas?allowPublicKeyRetrieval=true&keepAlive=true&autoReconnect=true&autoReconnectForPools=true&connectTimeout=30000&socketTimeout=180000&nullCatalogMeansCurrent=true&allowMultiQueries=false&useSSL=false&useUnicode=true&characterEncoding=utf-8&failOverReadOnly=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=CONVERT_TO_NULL}
username: ${DB_USERNAME:}
password: ${DB_PASSWORD:}
# 连接池配置(使用HikariCP)
hikari:
maximum-pool-size: 20
minimum-idle: 10
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 1800000
# REDIS (RedisProperties)
data:
redis:
host: ${REDIS_HOST:127.0.0.1}
password: ${REDIS_PASSWORD:}
port: ${REDIS_PORT:16379}
database: 0 # index
timeout: 30000ms # 连接超时时长(毫秒)
block-when-exhausted: true
lettuce:
pool:
max-active: 8 # 连接池最大连接数
max-idle: 8 # 连接池最大空闲连接
min-idle: 0 # 连接池最小空闲连接
# Actuator配置
management:
endpoints:
web:
exposure:
include: health,info,metrics
endpoint:
health:
show-details: always
# LLM:OpenAI 兼容协议(Ollama /v1、vLLM、云端网关皆可,换供应商只改这里)
llm:
base-url: ${LLM_BASE_URL:http://112.82.245.194:41434/v1}
api-key: ${LLM_API_KEY:ollama} # Ollama 不校验(任意非空);云端填真实 key
chat-model: ${LLM_CHAT_MODEL:qwen3.6-27b-iq3:latest}
erp:
baseurl: ${ERP_BASEURL:http://118.178.19.35:8080/xlyEntry_saas}
# dev-login = 无 token 时以 dev 账号(管理员)执行。生产必须保持 false,
# 否则任何未登录请求都会拿到管理员身份。本地开发在 application-saaslocal.yml 里开。
dev-login:
enabled: false