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:
|
||||
application:
|
||||
name: worklog-api
|
||||
|
||||
# Jackson 配置
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
@ -37,7 +50,7 @@ spring:
|
||||
max-idle: 8
|
||||
min-idle: 0
|
||||
|
||||
# Nacos 配置(可选)
|
||||
# Nacos 配置(可选,默认禁用)
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
@ -53,15 +66,9 @@ spring:
|
||||
namespace: ${NACOS_NAMESPACE:worklog-dev}
|
||||
file-extension: yml
|
||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
||||
# 是否启用 Nacos 配置中心(默认不启用)
|
||||
enabled: false
|
||||
|
||||
server:
|
||||
port: 8200
|
||||
servlet:
|
||||
context-path: /wlog
|
||||
|
||||
# MyBatis-Plus 配置
|
||||
# ==================== MyBatis-Plus 配置 ====================
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
@ -75,7 +82,7 @@ mybatis-plus:
|
||||
mapper-locations: classpath*:/mapper/**/*.xml
|
||||
type-aliases-package: com.wjbl.worklog.data.entity
|
||||
|
||||
# 日志配置
|
||||
# ==================== 日志配置 ====================
|
||||
logging:
|
||||
level:
|
||||
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'
|
||||
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId:-}][%X{spanId:-}] %-5level %logger{50} - %msg%n'
|
||||
|
||||
# SpringDoc 配置
|
||||
# ==================== SpringDoc 配置 ====================
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
path: /swagger-ui.html
|
||||
@ -100,7 +107,7 @@ springdoc:
|
||||
paths-to-match: '/**'
|
||||
packages-to-scan: com.wjbl.worklog.controller
|
||||
|
||||
# 腾讯云 COS 配置(可选)
|
||||
# ==================== 腾讯云 COS 配置(可选)====================
|
||||
tencent:
|
||||
cos:
|
||||
enabled: false
|
||||
@ -111,7 +118,7 @@ tencent:
|
||||
bucket-host: https://test-1308258046.cos.ap-beijing.myqcloud.com
|
||||
region: ap-beijing
|
||||
|
||||
# 应用配置
|
||||
# ==================== 应用自定义配置 ====================
|
||||
worklog:
|
||||
# Token 配置
|
||||
token:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user