zhongchangyuyu 1cf46e5633 资产优化
2025-04-25 19:53:53 +08:00

82 lines
2.1 KiB
YAML

server:
port: 8082
servlet:
context-path: /api
spring:
application:
name: asset-management
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://1.14.121.39:5432/edendb?currentSchema=public&charSet=UTF-8
username: edenuser
password: edenpswd
# HikariCP连接池配置
hikari:
# 连接池最大连接数
maximum-pool-size: 10
# 最小空闲连接数
minimum-idle: 5
# 连接最大空闲时间(毫秒)
idle-timeout: 30000
# 连接最大生存时间(毫秒)
max-lifetime: 1800000
# 连接超时时间(毫秒)
connection-timeout: 30000
# 测试连接有效性的SQL
connection-test-query: SELECT 1
# 连接泄漏检测,可帮助识别未关闭的连接
leak-detection-threshold: 60000
# 文件上传配置
servlet:
multipart:
enabled: true
max-file-size: 10MB
max-request-size: 20MB
file-size-threshold: 2KB
redis:
host: 1.14.121.39
port: 6379
password: edenpswd
database: 0
# MyBatis-Plus配置
mybatis-plus:
# XML映射文件路径
mapper-locations: classpath:mapper/**/*.xml
# 实体类包路径
type-aliases-package: com.psbc.cpsp.eden.common.entity
configuration:
# 下划线转驼峰命名
map-underscore-to-camel-case: true
# 打印SQL日志
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
# 主键类型设置为自增
id-type: auto
# 表名使用下划线风格
table-underline: true
# 逻辑删除配置
logic-delete-field: del_flag
logic-delete-value: 1
logic-not-delete-value: 0
# PageHelper分页插件配置
pagehelper:
# 数据库方言
helper-dialect: postgresql
# 分页合理化参数
reasonable: true
# 支持通过Mapper接口参数来传递分页参数
support-methods-arguments: true
# 自动识别count查询
params: count=countSql
# 日志配置
logging:
level:
com.eden.asset.mapper: debug
com.baomidou.mybatisplus: debug
com.baomidou.mybatisplus.core.executor: debug
org.apache.ibatis: debug