refactor: 更新开发和生产环境配置,调整AI相关API密钥和MinIO服务端点
This commit is contained in:
@@ -11,7 +11,7 @@ spring:
|
|||||||
|
|
||||||
ai:
|
ai:
|
||||||
openai:
|
openai:
|
||||||
api-key: ${QWEN_API_KEY:sk-c2941d05bf2f411ca80424fcd1eb4e07}
|
api-key: ${QWEN_API_KEY:sk-c2941d05bf2f411ca80424fcd1exxxxx}
|
||||||
base-url: https://dashscope.aliyuncs.com/compatible-mode
|
base-url: https://dashscope.aliyuncs.com/compatible-mode
|
||||||
chat:
|
chat:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -114,15 +114,15 @@ oss:
|
|||||||
# MinIO 对象存储服务
|
# MinIO 对象存储服务
|
||||||
minio:
|
minio:
|
||||||
# 服务Endpoint
|
# 服务Endpoint
|
||||||
endpoint: http://111.229.83.153:9000
|
endpoint: http://localhost:9000
|
||||||
# 访问凭据
|
# 访问凭据
|
||||||
access-key: minioadmin
|
access-key: minioadmin
|
||||||
# 凭据密钥
|
# 凭据密钥
|
||||||
secret-key: Youlai@2025
|
secret-key: minioadmin
|
||||||
# 存储桶名称
|
# 存储桶名称
|
||||||
bucket-name: public
|
bucket-name: public
|
||||||
# (可选)自定义域名,如果配置了域名,生成的文件URL是域名格式,未配置则URL则是IP格式 (eg: https://www.youlai.tech/storage)
|
# (可选)自定义域名,如果配置了域名,生成的文件URL是域名格式,未配置则URL则是IP格式 (eg: https://www.youlai.tech/storage)
|
||||||
custom-domain: https://www.youlai.tech/storage
|
custom-domain:
|
||||||
# 阿里云OSS对象存储服务
|
# 阿里云OSS对象存储服务
|
||||||
aliyun:
|
aliyun:
|
||||||
# 服务Endpoint
|
# 服务Endpoint
|
||||||
|
|||||||
@@ -4,23 +4,23 @@ server:
|
|||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
# === MySQL 数据源(默认启用) ===
|
driver-class-name: com.mysql.cj.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
url: jdbc:mysql://www.youlai.tech:3306/youlai_admin?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&allowMultiQueries=true
|
url: jdbc:mysql://www.youlai.tech:3306/youlai_admin?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&allowMultiQueries=true
|
||||||
username: youlai
|
username: youlai
|
||||||
password: 123456
|
password: 123456
|
||||||
|
|
||||||
# === PostgreSQL 数据源示例(按需启用) ===
|
ai:
|
||||||
# driver-class-name: org.postgresql.Driver
|
openai:
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/youlai_admin
|
api-key: ${QWEN_API_KEY:sk-c2941d05bf2f411ca80424fcd1exxxxx}
|
||||||
# username: postgres
|
base-url: https://dashscope.aliyuncs.com/compatible-mode
|
||||||
# password: 123456
|
chat:
|
||||||
|
enabled: true
|
||||||
|
options:
|
||||||
|
model: qwen-plus
|
||||||
|
temperature: 0.7
|
||||||
|
response-format:
|
||||||
|
type: json_object
|
||||||
|
|
||||||
# === 达梦 DM 数据源示例(按需启用,注意按实际驱动与 URL 调整) ===
|
|
||||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
|
||||||
# url: jdbc:dm://127.0.0.1:5236?schema=YOULAI_ADMIN
|
|
||||||
# username: SYSDBA
|
|
||||||
# password: 123456
|
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
database: 11
|
database: 11
|
||||||
@@ -63,29 +63,6 @@ spring:
|
|||||||
enable: true
|
enable: true
|
||||||
# 邮件发送者
|
# 邮件发送者
|
||||||
from: youlaitech@163.com
|
from: youlaitech@163.com
|
||||||
# Spring AI 配置
|
|
||||||
ai:
|
|
||||||
openai:
|
|
||||||
# API Key
|
|
||||||
api-key: ${DASHSCOPE_API_KEY:sk-c2941d05bf2f411ca80424fxxxxxxxx}
|
|
||||||
|
|
||||||
# Base URL
|
|
||||||
base-url: https://dashscope.aliyuncs.com/compatible-mode
|
|
||||||
|
|
||||||
# Chat 模型配置
|
|
||||||
chat:
|
|
||||||
enabled: true
|
|
||||||
options:
|
|
||||||
# 模型名称(qwen-plus、qwen-turbo、qwen-max、qwen-long)
|
|
||||||
model: qwen-plus
|
|
||||||
|
|
||||||
# Temperature(0.0-1.0,值越高回答越随机)
|
|
||||||
temperature: 0.7
|
|
||||||
|
|
||||||
# JSON 输出格式(确保模型返回合法 JSON)
|
|
||||||
response-format:
|
|
||||||
type: json_object
|
|
||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath*:/mapper/**/*.xml
|
mapper-locations: classpath*:/mapper/**/*.xml
|
||||||
global-config:
|
global-config:
|
||||||
@@ -144,7 +121,7 @@ oss:
|
|||||||
secret-key: minioadmin
|
secret-key: minioadmin
|
||||||
# 存储桶名称
|
# 存储桶名称
|
||||||
bucket-name: public
|
bucket-name: public
|
||||||
# (可选)自定义域名,如果配置了域名,生成的文件URL是域名格式,未配置则URL则是IP格式 (eg: https://oss.youlai.tech)
|
# (可选)自定义域名,如果配置了域名,生成的文件URL是域名格式,未配置则URL则是IP格式 (eg: https://www.youlai.tech/storage)
|
||||||
custom-domain:
|
custom-domain:
|
||||||
# 阿里云OSS对象存储服务
|
# 阿里云OSS对象存储服务
|
||||||
aliyun:
|
aliyun:
|
||||||
@@ -177,33 +154,32 @@ sms:
|
|||||||
# 修改手机号短信验证码模板
|
# 修改手机号短信验证码模板
|
||||||
change-mobile: SMS_22xxx773
|
change-mobile: SMS_22xxx773
|
||||||
|
|
||||||
# springdoc配置: https://springdoc.org/properties.html
|
# springdoc 配置文档: https://springdoc.org/properties.html
|
||||||
springdoc:
|
springdoc:
|
||||||
swagger-ui:
|
swagger-ui:
|
||||||
path: /swagger-ui.html
|
path: /swagger-ui.html # Swagger UI 访问路径
|
||||||
operationsSorter: alpha
|
operationsSorter: alpha # 接口按方法名排序
|
||||||
tags-sorter: alpha
|
tags-sorter: alpha # 标签按字母排序
|
||||||
api-docs:
|
api-docs:
|
||||||
path: /v3/api-docs
|
path: /v3/api-docs # OpenAPI JSON 地址
|
||||||
group-configs:
|
group-configs: # 分组配置
|
||||||
- group: "系统管理"
|
- group: '系统管理' # 分组名称
|
||||||
paths-to-match: "/**"
|
paths-to-match: "/**" # 匹配的请求路径
|
||||||
packages-to-scan:
|
packages-to-scan: # 扫描的 Controller 包,限制只生成指定包的接口文档
|
||||||
- com.youlai.boot.auth.controller
|
- com.youlai.boot.auth.controller
|
||||||
- com.youlai.boot.system.controller
|
- com.youlai.boot.system.controller
|
||||||
- com.youlai.boot.platform.file.controller
|
- com.youlai.boot.platform.file.controller
|
||||||
- com.youlai.boot.platform.codegen.controller
|
- com.youlai.boot.platform.codegen.controller
|
||||||
default-flat-param-object: true
|
default-flat-param-object: true # 将对象参数扁平化显示在文档中
|
||||||
|
|
||||||
# knife4j 接口文档配置
|
# knife4j 配置
|
||||||
knife4j:
|
knife4j:
|
||||||
# 是否开启 Knife4j 增强功能
|
enable: true # 是否启用 Knife4j 增强功能
|
||||||
enable: true # 设置为 true 表示开启增强功能
|
production: false # 是否启用生产环境保护(true=生产环境隐藏文档,false=开发环境可访问)
|
||||||
# 生产环境配置
|
|
||||||
production: false # 设置为 true 表示在生产环境中不显示文档,为 false 表示显示文档(通常在开发环境中使用)
|
|
||||||
setting:
|
setting:
|
||||||
language: zh_cn
|
language: zh_cn
|
||||||
|
|
||||||
|
|
||||||
# xxl-job 定时任务配置
|
# xxl-job 定时任务配置
|
||||||
xxl:
|
xxl:
|
||||||
job:
|
job:
|
||||||
@@ -255,66 +231,3 @@ wx:
|
|||||||
miniapp:
|
miniapp:
|
||||||
app-id: xxxxxx
|
app-id: xxxxxx
|
||||||
app-secret: xxxxxx
|
app-secret: xxxxxx
|
||||||
|
|
||||||
# ==================== AI 命令系统配置 ====================
|
|
||||||
ai:
|
|
||||||
# 是否启用 AI 功能
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
# 当前使用的提供商:qwen、deepseek、openai
|
|
||||||
provider: qwen
|
|
||||||
|
|
||||||
# 所有提供商配置(统一管理,扩展性强)
|
|
||||||
providers:
|
|
||||||
# 阿里通义千问(推荐:有免费额度)
|
|
||||||
qwen:
|
|
||||||
# API Key(https://bailian.console.aliyun.com/ 获取)
|
|
||||||
api-key: ${QWEN_API_KEY:sk-c2941d05bf2f411ca80424fcd1eb4e07}
|
|
||||||
|
|
||||||
# Base URL(OpenAI 兼容端点)
|
|
||||||
base-url: https://dashscope.aliyuncs.com/compatible-mode/v1
|
|
||||||
|
|
||||||
# 模型:qwen-plus(推荐)、qwen-turbo、qwen-max、qwen-long
|
|
||||||
model: qwen-plus
|
|
||||||
|
|
||||||
# 显示名称
|
|
||||||
display-name: 阿里通义千问
|
|
||||||
|
|
||||||
# 超时时间(秒)
|
|
||||||
timeout: 30
|
|
||||||
|
|
||||||
# DeepSeek
|
|
||||||
deepseek:
|
|
||||||
api-key: ${DEEPSEEK_API_KEY:}
|
|
||||||
base-url: https://api.deepseek.com/v1
|
|
||||||
model: deepseek-chat
|
|
||||||
display-name: DeepSeek
|
|
||||||
timeout: 30
|
|
||||||
|
|
||||||
# OpenAI(添加新提供商只需配置,无需修改代码)
|
|
||||||
openai:
|
|
||||||
api-key: ${OPENAI_API_KEY:}
|
|
||||||
base-url: https://api.openai.com/v1
|
|
||||||
model: gpt-4
|
|
||||||
display-name: OpenAI GPT-4
|
|
||||||
timeout: 60
|
|
||||||
|
|
||||||
# 安全配置
|
|
||||||
security:
|
|
||||||
enable-audit: true
|
|
||||||
dangerous-operations-confirm: true
|
|
||||||
function-whitelist:
|
|
||||||
- getUserInfo
|
|
||||||
- updateUser
|
|
||||||
- queryUsers
|
|
||||||
- assignRole
|
|
||||||
sensitive-params:
|
|
||||||
- password
|
|
||||||
- idCard
|
|
||||||
- bankCard
|
|
||||||
- token
|
|
||||||
|
|
||||||
# 限流配置
|
|
||||||
rate-limit:
|
|
||||||
max-executions-per-minute: 10
|
|
||||||
max-executions-per-day: 100
|
|
||||||
|
|||||||
Reference in New Issue
Block a user