Files
gym-manage/gym-manage-api/manage-app/src/main/resources/application.yml
T
liwentao 544ddeec5a 增加Redis缓存功能
注:/api/groupCourse/cache/get接口为测试接口
2026-06-02 17:18:17 +08:00

96 lines
2.3 KiB
YAML

server:
port: 8084
spring:
aop:
proxy-target-class: true
application:
name: gym-manage-api
main:
allow-bean-definition-overriding: true
cache:
type: none
autoconfigure:
exclude:
- org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
r2dbc:
url: r2dbc:postgresql://${DB_HOST:localhost}:${DB_PORT:55432}/${DB_NAME:manage_system}
username: ${DB_USERNAME:novalon}
password: ${DB_PASSWORD:novalon123}
pool:
initial-size: 10
max-size: 50
max-idle-time: 30m
max-life-time: 1h
acquire-timeout: 5s
datasource:
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:55432}/${DB_NAME:manage_system}
username: ${DB_USERNAME:novalon}
password: ${DB_PASSWORD:novalon123}
driver-class-name: org.postgresql.Driver
flyway:
enabled: true
locations: classpath:db/migration
baseline-on-migrate: true
baseline-version: 0
validate-on-migrate: true
security:
user:
name: disabled
password: disabled
data:
redis:
host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:novalon123}
timeout: 5000
lettuce:
pool:
max-active: 8 # 最大连接数
max-idle: 8 # 最大空闲连接
min-idle: 0 # 最小空闲连接
max-wait: -1ms # 连接等待时间
profiles:
active: dev
config:
import: classpath:member-config.yml
management:
endpoints:
web:
exposure:
include: health,info,metrics,env,loggers
base-path: /actuator
endpoint:
health:
show-details: always
metrics:
tags:
application: ${spring.application.name}
environment: ${spring.profiles.active}
logging:
level:
cn.novalon.manage: DEBUG
org.springframework.r2dbc: DEBUG
cn.novalon.manage.db: DEBUG
jwt:
secret: ${JWT_SECRET:U2FsdGVkX1+vZ5Y9QmKxL8nN3rP7tW2jH4fG6dA8sB1cE5yN0zX3qV7wM4}
expiration: ${JWT_EXPIRATION:86400000}
springdoc:
api-docs:
path: /api-docs
enabled: true
swagger-ui:
path: /swagger-ui.html
enabled: true
tags-sorter: alpha
operations-sorter: alpha
show-actuator: false
default-consumes-media-type: application/json
default-produces-media-type: application/json