Browse Source

配置文件

master
wanghanlin 1 day ago
parent
commit
c765231ac6
  1. 101
      src/main/resources/application.yml

101
src/main/resources/application.yml

@ -0,0 +1,101 @@
# ================================================================
# Support Bot - AI智能客服系统 配置文件
# ================================================================
# ==================== 服务端口 ====================
server:
port: 9090
# ==================== Spring AI Alibaba DashScope 配置 ====================
# 注意: 需要替换为你的阿里云 DashScope API Key
# 获取地址: https://dashscope.console.aliyun.com/
spring:
ai:
dashscope:
api-key: sk-ws-H.RPMIMYH.G2gK.MEQCIFQ2aUocl1x5Q8sod1UgcBy0DzC5aJda5J-14thyXERBAiBYwX1k-7lWbEWYPnnDmJ9UV11uxLa13czU4hMMWJzi3A
chat:
options:
model: qwen-turbo
temperature: 0.7
embedding:
options:
model: text-embedding-v2
# ==================== 数据源配置(PostgreSQL + PGVector) ====================
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/support_bot
username: postgres
password: supportbot123
hikari:
maximum-pool-size: 10
minimum-idle: 5
idle-timeout: 300000
connection-timeout: 20000
# ==================== SQL 初始化(首次启动可开启,后续建议关闭) ====================
sql:
init:
mode: never
schema-locations: classpath:support-bot.sql
continue-on-error: true
servlet:
multipart:
max-file-size: 50MB
max-request-size: 50MB
# ==================== MyBatis Plus 配置 ====================
mybatis-plus:
# 实体类扫描包路径
type-aliases-package: com.wok.supportbot.entity
# Mapper XML 文件位置
mapper-locations: classpath*:mapper/**/*.xml
configuration:
# 日志输出
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 下划线转驼峰
map-underscore-to-camel-case: true
global-config:
db-config:
# 逻辑删除字段
logic-delete-field: isDelete
logic-delete-value: true
logic-not-delete-value: false
# 主键类型
id-type: assign_id
# ==================== 知识库文档处理配置 ====================
knowledge:
chunk:
chunk-size: 200
overlap: 100
min-chunk-size-chars: 10
max-num-chunks: 5000
keep-separator: true
# ==================== Knife4j API 文档配置 ====================
springdoc:
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha
operations-sorter: alpha
api-docs:
path: /v3/api-docs
group-configs:
- group: default
paths-to-match: /**
packages-to-scan: com.wok.supportbot.controller
knife4j:
enable: true
setting:
language: zh_cn
swagger-model-name: 实体类列表
logging:
level:
root: INFO
com.wok.supportbot: DEBUG
org.springframework.ai: DEBUG
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
Loading…
Cancel
Save