style: 重新整理 application.yml 配置顺序
- 添加文件头注释 - 服务基础配置 (server) 放在最上面 - Spring 配置紧随其后 - 添加分隔注释提高可读性 - 配置顺序:server → spring → mybatis-plus → logging → springdoc → tencent → worklog
This commit is contained in:
parent
abe485a267
commit
6f4779506f
@ -1,6 +1,19 @@
|
|||||||
|
# ====================================================
|
||||||
|
# 工作日志服务平台 - 主配置文件
|
||||||
|
# ====================================================
|
||||||
|
|
||||||
|
# ==================== 服务基础配置 ====================
|
||||||
|
server:
|
||||||
|
port: 8200
|
||||||
|
servlet:
|
||||||
|
context-path: /wlog
|
||||||
|
|
||||||
|
# ==================== Spring 配置 ====================
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: worklog-api
|
name: worklog-api
|
||||||
|
|
||||||
|
# Jackson 配置
|
||||||
jackson:
|
jackson:
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
date-format: yyyy-MM-dd HH:mm:ss
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
@ -37,7 +50,7 @@ spring:
|
|||||||
max-idle: 8
|
max-idle: 8
|
||||||
min-idle: 0
|
min-idle: 0
|
||||||
|
|
||||||
# Nacos 配置(可选)
|
# Nacos 配置(可选,默认禁用)
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
@ -53,15 +66,9 @@ spring:
|
|||||||
namespace: ${NACOS_NAMESPACE:worklog-dev}
|
namespace: ${NACOS_NAMESPACE:worklog-dev}
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
||||||
# 是否启用 Nacos 配置中心(默认不启用)
|
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
server:
|
# ==================== MyBatis-Plus 配置 ====================
|
||||||
port: 8200
|
|
||||||
servlet:
|
|
||||||
context-path: /wlog
|
|
||||||
|
|
||||||
# MyBatis-Plus 配置
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
configuration:
|
configuration:
|
||||||
map-underscore-to-camel-case: true
|
map-underscore-to-camel-case: true
|
||||||
@ -75,7 +82,7 @@ mybatis-plus:
|
|||||||
mapper-locations: classpath*:/mapper/**/*.xml
|
mapper-locations: classpath*:/mapper/**/*.xml
|
||||||
type-aliases-package: com.wjbl.worklog.data.entity
|
type-aliases-package: com.wjbl.worklog.data.entity
|
||||||
|
|
||||||
# 日志配置
|
# ==================== 日志配置 ====================
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
root: INFO
|
root: INFO
|
||||||
@ -88,7 +95,7 @@ logging:
|
|||||||
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId:-}][%X{spanId:-}] %-5level %logger{50} - %msg%n'
|
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId:-}][%X{spanId:-}] %-5level %logger{50} - %msg%n'
|
||||||
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId:-}][%X{spanId:-}] %-5level %logger{50} - %msg%n'
|
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId:-}][%X{spanId:-}] %-5level %logger{50} - %msg%n'
|
||||||
|
|
||||||
# SpringDoc 配置
|
# ==================== SpringDoc 配置 ====================
|
||||||
springdoc:
|
springdoc:
|
||||||
swagger-ui:
|
swagger-ui:
|
||||||
path: /swagger-ui.html
|
path: /swagger-ui.html
|
||||||
@ -100,7 +107,7 @@ springdoc:
|
|||||||
paths-to-match: '/**'
|
paths-to-match: '/**'
|
||||||
packages-to-scan: com.wjbl.worklog.controller
|
packages-to-scan: com.wjbl.worklog.controller
|
||||||
|
|
||||||
# 腾讯云 COS 配置(可选)
|
# ==================== 腾讯云 COS 配置(可选)====================
|
||||||
tencent:
|
tencent:
|
||||||
cos:
|
cos:
|
||||||
enabled: false
|
enabled: false
|
||||||
@ -111,7 +118,7 @@ tencent:
|
|||||||
bucket-host: https://test-1308258046.cos.ap-beijing.myqcloud.com
|
bucket-host: https://test-1308258046.cos.ap-beijing.myqcloud.com
|
||||||
region: ap-beijing
|
region: ap-beijing
|
||||||
|
|
||||||
# 应用配置
|
# ==================== 应用自定义配置 ====================
|
||||||
worklog:
|
worklog:
|
||||||
# Token 配置
|
# Token 配置
|
||||||
token:
|
token:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user