调整配置文件。

pull/1/head
ZhouXY108 2023-01-28 17:36:35 +08:00
parent c73c722b87
commit 6d7517f778
4 changed files with 80 additions and 77 deletions

2
.gitignore vendored
View File

@ -32,6 +32,8 @@ build/
### VS Code ### ### VS Code ###
.vscode/ .vscode/
log/
### bak ### ### bak ###
*.bak *.bak
*-secret.yaml

View File

@ -0,0 +1,69 @@
spring:
# redis配置
redis:
# Redis数据库索引默认为0
database: 1
# Redis服务器地址
host: 127.0.0.1
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码默认为空
# password:
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池最大连接数
max-active: 200
# 连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# 连接池中的最大空闲连接
max-idle: 10
# 连接池中的最小空闲连接
min-idle: 0
# 数据库
datasource:
url: jdbc:postgresql://localhost:5432/plusone
username: plusone
password: XXXXXXXXXXXXXXXX
plusone:
application:
name: plusone
server:
port: 8108
debug: true
# 短信发送相关参数
sms:
region: ap-guangzhou
credential:
secret-id: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
secret-key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
client:
# SDK 默认用 TC3-HMAC-SHA256 进行签名,非必要请不要修改这个字段
sign-method: HmacSHA256
http:
# proxy:
# host: xxx
# port: xxx
req-method: POST
conn-timeout: 60
app-id: 1111111111
templates:
code: 0000000
# 邮件发送相关参数
mail:
host: smtp.163.com
#设置邮件发送者
from: example@163.com
password: XXXXXXXXXXXXXXXX
# 异常拦截机制是否拦截所有异常
exception:
handle-all-exception: false
# 日志配置
logging:
level:
root: debug

View File

@ -1,79 +1,11 @@
spring:
profiles:
active: public
plusone: plusone:
application:
name: plusone
server:
port: 8108
debug: true
# 短信发送相关参数
sms:
region: ap-guangzhou
credential:
secret-id: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
secret-key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
client:
# SDK 默认用 TC3-HMAC-SHA256 进行签名,非必要请不要修改这个字段
sign-method: HmacSHA256
http:
# proxy:
# host: xxx
# port: xxx
req-method: POST
conn-timeout: 60
app-id: 1111111111
templates:
code: 0000000
# 邮件发送相关参数 # 邮件发送相关参数
mail: mail:
host: smtp.163.com
#设置邮件发送者
from: example@163.com
password: XXXXXXXXXXXXXXXX
subject: subject:
code: Plusone code: Plusone
template: template:
code: 【Plusone】验证码%s10分钟内有效请勿泄露。 code: 【Plusone】验证码%s10分钟内有效请勿泄露。
# 异常拦截机制是否拦截所有异常
exception:
handle-all-exception: false
spring:
# redis配置
redis:
# Redis数据库索引默认为0
database: 1
# Redis服务器地址
host: 127.0.0.1
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码默认为空
# password:
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池最大连接数
max-active: 200
# 连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# 连接池中的最大空闲连接
max-idle: 10
# 连接池中的最小空闲连接
min-idle: 0
# 数据库
datasource:
url: jdbc:postgresql://localhost:5432/plusone
username: plusone
password: XXXXXXXXXXXXXXXX
# 日志配置
logging:
file:
name: ${user.home}/logs/${plusone.application.name}.log
level:
root: INFO
xyz.zhouxy.plusone: DEBUG
org.springframework.jdbc.core: DEBUG
xyz.zhouxy.plusone.system.application.query: DEBUG

View File

@ -10,23 +10,23 @@
</encoder> </encoder>
</appender> </appender>
<!-- <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder> <encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %5level ${PID:- } - [%15.15t] %-50.50logger : %msg%n</pattern> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %5level ${PID:- } - [%15.15t] %-50.50logger : %msg%n</pattern>
<charset>utf-8</charset> <charset>utf-8</charset>
</encoder> </encoder>
<file>log/output.log</file> <file>log/plusone.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>log/output.log.%i</fileNamePattern> <fileNamePattern>log/plusone.log.%i</fileNamePattern>
</rollingPolicy> </rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>20MB</MaxFileSize> <MaxFileSize>20MB</MaxFileSize>
</triggeringPolicy> </triggeringPolicy>
</appender> --> </appender>
<root level="INFO"> <root level="INFO">
<appender-ref ref="CONSOLE" /> <appender-ref ref="CONSOLE" />
<!-- <appender-ref ref="FILE" /> --> <appender-ref ref="FILE" />
</root> </root>
</configuration> </configuration>