Skip to content

Commit ed134ba

Browse files
committed
update:更新环境配置
1 parent e312d9c commit ed134ba

File tree

2 files changed

+32
-24
lines changed

2 files changed

+32
-24
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# 开发环境配置
2+
3+
# 数据库连接配置
4+
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
5+
spring.datasource.url=jdbc:mysql://localhost:3306/xiaozhi?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true
6+
spring.datasource.username=xiaozhi
7+
spring.datasource.password=123456
8+
9+
# 开发环境日志级别
10+
logging.level.com.xiaozhi.dao=DEBUG
11+
logging.level.com.xiaozhi.websocket=DEBUG
12+
13+
# 开发环境邮箱配置
14+
email.smtp.username=xxx
15+
email.smtp.password=xxx
16+
17+
# 开发环境腾讯云COS配置
18+
tencent.cos.secret-id=xxx
19+
tencent.cos.secret-key=xxx
20+
tencent.cos.region=xxx
21+
tencent.cos.bucket-name=xxx
22+
tencent.cos.path-prefix=uploads
Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1+
# 通用配置(所有环境共享)
12
server.port=8091
2-
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
3-
4-
spring.datasource.url=jdbc:mysql://localhost:3306/xiaozhi?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true
5-
spring.datasource.username=xiaozhi
6-
spring.datasource.password=123456
73

4+
# Mybatis配置
85
mybatis.mapper-locations=classpath*:com/xiaozhi/mapper/*.xml
96

10-
spring.profiles.active=dev
7+
# 数据库连接池通用配置
118
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
129
spring.datasource.hikari.minimum-idle=5
1310
spring.datasource.hikari.maximum-pool-size=15
@@ -18,11 +15,11 @@ spring.datasource.hikari.max-lifetime=120000
1815
spring.datasource.hikari.connection-timeout=10000000
1916
spring.datasource.hikari.connection-test-query=SELECT 1
2017

21-
logging.level.org.springframework=INFO
22-
logging.level.com.xiaozhi.dao=DEBUG
23-
logging.level.com.xiaozhi.websocket=DEBUG
24-
# 设置根日志级别,确保所有日志都能输出
18+
# 日志通用配置
2519
logging.level.root=INFO
20+
logging.level.org.springframework=INFO
21+
logging.level.io.github.imfangs.dify.client.impl.StreamEventDispatcher=ERROR
22+
2623
# 禁用Groovy模板位置检查
2724
spring.groovy.template.check-template-location=false
2825

@@ -45,19 +42,8 @@ spring.session.cookie.path=/
4542
# 启用虚拟线程
4643
spring.threads.virtual.enabled=true
4744

48-
# dify插件的日志级别
49-
logging.level.io.github.imfangs.dify.client.impl.StreamEventDispatcher=ERROR
50-
51-
# 邮箱配置
52-
email.smtp.username=xxx
53-
email.smtp.password=xxx
54-
55-
# 腾讯云COS配置
56-
tencent.cos.secret-id=xxx
57-
tencent.cos.secret-key=xxx
58-
tencent.cos.region=xxx
59-
tencent.cos.bucket-name=xxx
60-
tencent.cos.path-prefix=uploads
61-
6245
# 缓存
6346
spring.cache.type=simple
47+
48+
# 激活的配置文件(默认为开发环境)
49+
spring.profiles.active=dev

0 commit comments

Comments
 (0)