Files
biji/biji-houdaun/src/main/resources/application-prod.yml

56 lines
1.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
spring:
datasource:
driver-class-name: ${DB_DRIVER:com.mysql.cj.jdbc.Driver}
url: ${DB_URL}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
# HikariCP连接池优化配置生产环境
hikari:
# 连接池名称
pool-name: BijiHikariPool
# 最小空闲连接数
minimum-idle: 10
# 最大连接数
maximum-pool-size: 50
# 连接空闲超时时间(毫秒)
idle-timeout: 600000
# 连接最大存活时间(毫秒)- 设置为小于MySQL的wait_timeout默认8小时
max-lifetime: 600000
# 连接超时时间(毫秒)
connection-timeout: 30000
# 测试连接是否可用的SQL
connection-test-query: SELECT 1
# 自动提交
auto-commit: true
# 连接测试间隔
keepalive-time: 300000
jpa:
hibernate:
ddl-auto: update
show-sql: false
properties:
hibernate:
format_sql: false
dialect: org.hibernate.dialect.MySQLDialect
# MyBatis-Plus配置
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
configuration:
map-underscore-to-camel-case: true
# 生产环境关闭SQL日志
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
global-config:
db-config:
logic-delete-field: isDeleted # 全局逻辑删除的实体字段名
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
# 禁用Knife4j
knife4j:
enable: false
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB