76 lines
1.8 KiB
YAML
76 lines
1.8 KiB
YAML
server:
|
|
port: 9001
|
|
|
|
spring:
|
|
application:
|
|
name: emotion-user
|
|
main:
|
|
allow-bean-definition-overriding: true
|
|
cloud:
|
|
nacos:
|
|
discovery:
|
|
server-addr: ${NACOS_SERVER_ADDR:localhost:8848}
|
|
namespace: public
|
|
group: DEFAULT_GROUP
|
|
enabled: true
|
|
ip: ${SERVER_IP:localhost}
|
|
metadata:
|
|
version: 1.0.0
|
|
environment: prod
|
|
config:
|
|
enabled: false
|
|
datasource:
|
|
url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/${MYSQL_DATABASE:emotion_museum}?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true
|
|
username: ${MYSQL_USERNAME:emotion}
|
|
password: ${MYSQL_PASSWORD:EmotionDB2024!}
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
hikari:
|
|
minimum-idle: 5
|
|
maximum-pool-size: 20
|
|
idle-timeout: 600000
|
|
max-lifetime: 1800000
|
|
connection-timeout: 30000
|
|
data:
|
|
redis:
|
|
host: ${REDIS_HOST:localhost}
|
|
port: ${REDIS_PORT:6379}
|
|
database: 0
|
|
timeout: 3000ms
|
|
lettuce:
|
|
pool:
|
|
max-active: 20
|
|
max-idle: 10
|
|
min-idle: 5
|
|
max-wait: 3000ms
|
|
|
|
# MyBatis Plus配置
|
|
mybatis-plus:
|
|
configuration:
|
|
map-underscore-to-camel-case: true
|
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|
global-config:
|
|
db-config:
|
|
id-type: input
|
|
logic-delete-field: is_deleted
|
|
logic-delete-value: 1
|
|
logic-not-delete-value: 0
|
|
mapper-locations: classpath*:mapper/*.xml
|
|
|
|
# 日志配置
|
|
logging:
|
|
level:
|
|
com.emotionmuseum: INFO
|
|
com.baomidou.mybatisplus: DEBUG
|
|
pattern:
|
|
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
|
|
|
# 管理端点
|
|
management:
|
|
endpoints:
|
|
web:
|
|
exposure:
|
|
include: health,info,metrics
|
|
endpoint:
|
|
health:
|
|
show-details: always
|