application.yml
4.78 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#配置日志
logging:
config : classpath:logback-spring.xml
dirpath: D:/xlyweberp/logs/xlyAi
level:
root: info
com.xly: debug
com.xlyflow: debug
org.springframework: warn
ai.djl: DEBUG
dev.langchain4j: DEBUG
server:
port: 8099
servlet:
context-path: /xlyAi
encoding:
charset: UTF-8
enabled: true
compression:
enabled: true
mime-types: audio/mpeg
spring:
main:
allow-bean-definition-overriding: true
application:
name: xlyAi
version: 1.0.0
thymeleaf:
prefix: classpath:/templates/
suffix: .html
mode: HTML
encoding: UTF-8
cache: false # 开发时关闭缓存
mvc:
static-path-pattern: /static/**
web:
resources:
static-locations: classpath:/static/
# 禁用默认的静态资源处理规则
add-mappings: false
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://118.178.19.35:3318/xlyweberp_saas?allowPublicKeyRetrieval=true&keepAlive=true&autoReconnect=true&autoReconnectForPools=true&connectTimeout=30000&socketTimeout=180000&nullCatalogMeansCurrent=true&&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&failOverReadOnly=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=CONVERT_TO_NULL
username: xlyprint
password: xlyXLYprint2016
# 连接池配置(使用HikariCP)
hikari:
maximum-pool-size: 20
minimum-idle: 10
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 1800000
# REDIS (RedisProperties)
data:
redis:
host: 127.0.0.1
password: xlyXLY2015
port: 16379
database: 0 # index
timeout: 30000ms # 连接超时时长(毫秒)
block-when-exhausted: true #redis配置结束
lettuce:
pool:
max-active: 8 # 连接池最大连接数
max-idle: 8 # 连接池最大空闲连接
min-idle: 0 # 连接池最小空闲连接'
milvus:
host: 112.82.245.194
port: 19530
database: xlymilvus
username:
password:
collection:
question-sql: question_sql_vectors
sync:
batch-size: 100
vector:
dimension: 384 # All-MiniLM-L6-v2 模型的维度
text:
max-length: 65535
schema:
type: base # base, detailed, partitioned, searchable
# 重试配置
retry:
enabled: true # 是否启用重试
max-retry-times: 75 # 最大重试次数(SDK默认值)
initial-backoff-ms: 10 # 初始退避时间(ms)
max-backoff-ms: 3000 # 最大退避时间(ms)
backoff-multiplier: 3 # 退避乘数
retry-on-rate-limit: true # 遇到限流是否重试
max-retry-timeout-ms: 0 # 最大重试超时时间(0表示不限制)
# 操作级别的重试配置(可选,覆盖默认值)
operations:
query:
max-retry-times: 3
initial-backoff-ms: 100
max-backoff-ms: 2000
insert:
max-retry-times: 2
initial-backoff-ms: 50
max-backoff-ms: 1000
search:
max-retry-times: 3
initial-backoff-ms: 200
max-backoff-ms: 3000
max-retry-timeout-ms: 10000
# Actuator配置
management:
endpoints:
web:
exposure:
include: health,info,metrics
endpoint:
health:
show-details: always
health:
milvus:
enabled: true
# application.yml 或 application.properties
langchain4j:
ollama:
# 聊天模型配置(用于一般对话)
base-url: http://112.82.245.194:11434
chat-model-name: qwen2.5:7b-instruct
# chat-model-name: qwen3:14b
# chat-model-name: qwen3.5:9b
# SQL/代码模型配置(专门用于代码和SQL生成)
sql-model-name: qwen2.5-coder:7b
# sql-model-name: SimonPu/qwen3-coder:30B-Instruct_Q4_K_XL
# sql-model-name: qwen2.5-coder:32b
# 或者如果两个模型在同一服务器,可以使用同一个URL
# ollama:
# # 聊天模型配置(用于一般对话)
# base-url: http://112.82.245.194:11434
# chat-model-name: qwen3.5:9b
# # SQL/代码模型配置(专门用于代码和SQL生成)
# sql-model-name: mdq100/qwen3.5-coder:35b
tesseract:
# 这里填写你存放 tessdata 的目录路径,注意不是 tessdata 文件夹本身
datapath: D:/xlyweberp/Tesseract-OCR/tessdata
mybatis:
mapper-locations: classpath:mapper/*.xml
type-aliases-package: com.xly.entity
configuration:
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 情感预设缓存
cache:
enabled: true
max-size: 100 # 最大缓存条目数
expire-time: 3600 # 缓存过期时间(秒)
# TTS配置
tts:
python:
url: http://localhost:8000
timeout: 30000
max-connections: 10
erp:
baseurl: http://118.178.19.35:8080/xlyEntry_saas