server:
|
port: 8080
|
servlet:
|
context-path: /admin
|
|
spring:
|
application:
|
name: web-manage-back
|
profiles:
|
active: dev
|
jackson:
|
date-format: yyyy-MM-dd HH:mm:ss
|
time-zone: GMT+8
|
|
#mcv配置
|
mvc:
|
pathmatch:
|
matching-strategy: ant_path_matcher
|
|
# 数据源配置
|
datasource:
|
type: com.alibaba.druid.pool.DruidDataSource
|
driver-class-name: org.postgresql.Driver
|
url: jdbc:postgresql://localhost:5432/web_manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
username: postgres
|
password: zkyxpostgres
|
druid:
|
# 初始连接数
|
initial-size: 5
|
# 最小连接池数量
|
min-idle: 10
|
# 最大连接池数量
|
max-active: 20
|
# 配置获取连接等待超时的时间
|
max-wait: 60000
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
time-between-eviction-runs-millis: 60000
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
min-evictable-idle-time-millis: 300000
|
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
max-evictable-idle-time-millis: 900000
|
# 配置检测连接是否有效
|
validation-query: SELECT 1
|
test-while-idle: true
|
test-on-borrow: false
|
test-on-return: false
|
# 打开PSCache,并且指定每个连接上PSCache的大小
|
pool-prepared-statements: true
|
max-pool-prepared-statement-per-connection-size: 20
|
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
filters: stat,wall,slf4j
|
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
# 配置DruidStatFilter
|
web-stat-filter:
|
enabled: true
|
url-pattern: /*
|
exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
|
# 配置DruidStatViewServlet
|
stat-view-servlet:
|
enabled: true
|
url-pattern: /druid/*
|
reset-enable: false
|
login-username: admin
|
login-password: 123456
|
|
# Redis配置
|
redis:
|
host: 192.168.110.129
|
port: 6379
|
password:
|
database: 0
|
timeout: 10000ms
|
lettuce:
|
pool:
|
max-active: 8
|
max-wait: -1ms
|
max-idle: 8
|
min-idle: 0
|
|
# MinIO配置
|
minio:
|
endpoint: http://192.168.110.129:9000
|
access-key: minioadmin
|
secret-key: minioadmin
|
bucket-name: web-manage
|
|
# MyBatis Plus配置
|
mybatis-plus:
|
configuration:
|
# 开启驼峰命名
|
map-underscore-to-camel-case: true
|
# 开启sql日志
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
global-config:
|
db-config:
|
# 主键类型
|
id-type: auto
|
# 逻辑删除配置
|
logic-delete-field: deleted
|
logic-delete-value: 1
|
logic-not-delete-value: 0
|
mapper-locations: classpath*:/mapper/**/*.xml
|
|
# 日志配置
|
logging:
|
level:
|
com.webmanage: debug
|
org.springframework.web: debug
|
pattern:
|
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n"
|
|
# Knife4j配置
|
knife4j:
|
enable: true
|
setting:
|
language: zh-CN
|
enable-swagger-models: true
|
enable-document-manage: true
|
swagger-model-name: 实体类列表
|
basic:
|
enable: false
|
|
# 购物车配置
|
cart:
|
# Redis缓存过期时间(天)
|
expire-days: 30
|
# 是否启用数据库持久化
|
enable-persistence: true
|
# 是否启用数据一致性检查
|
enable-consistency-check: true
|
# 同步策略:realtime(实时同步)、batch(批量同步)、manual(手动同步)
|
sync-strategy: realtime
|