mirror of
https://github.com/201206030/novel.git
synced 2025-07-06 21:16:38 +00:00
feat: 增加 HTTP 请求和响应的日志记录
This commit is contained in:
@ -30,7 +30,7 @@ server:
|
||||
--- #---------------------数据库配置---------------------------
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/novel_test?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://localhost:3306/novel?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: test123456
|
||||
# ShardingSphere-JDBC 配置
|
||||
@ -229,6 +229,19 @@ spring:
|
||||
class: javax.net.ssl.SSLSocketFactory
|
||||
fallback: false
|
||||
|
||||
--- #----------------------Logbook配置-----------------------------
|
||||
logbook:
|
||||
format:
|
||||
# 输出格式
|
||||
style: http
|
||||
obfuscate:
|
||||
headers:
|
||||
# 隐藏 Authorization 头信息
|
||||
- Authorization
|
||||
parameters:
|
||||
# 隐藏密码参数
|
||||
- password
|
||||
|
||||
--- #---------------------自定义配置----------------------------
|
||||
novel:
|
||||
# 跨域配置
|
||||
@ -237,7 +250,7 @@ novel:
|
||||
allow-origins:
|
||||
- http://localhost:1024
|
||||
- http://localhost:8080
|
||||
# JWT密钥
|
||||
# JWT 密钥
|
||||
jwt:
|
||||
secret: E66559580A1ADF48CDD928516062F12E
|
||||
# XSS 过滤配置
|
||||
|
@ -62,6 +62,10 @@
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
</logger>
|
||||
<logger name="org.zalando.logbook" level="TRACE" additivity="false">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
</logger>
|
||||
</springProfile>
|
||||
|
||||
<springProfile name="prod">
|
||||
|
Reference in New Issue
Block a user