
#项目运行端口配置
server:
# 端口号
port: 8081
spring:
# 数据源配置
datasource:
username: 数据库用户名
password: 数据库用户密码
url: jdbc:mysql://localhost:3306/数据库名?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
pool-name: DateHikariCP # 连接池名字
connection-timeout: 30000 # 等待连接池分配连接的最大时长(毫秒),超过这个时长还没可用的连接则发生SQLException, 默认:30秒
minimum-idle: 5 # 最小连接数
maximum-pool-size: 20 # 最大连接数
auto-commit: true # 事务自动提交
idle-timeout: 600000 # 连接超时的最大时长(毫秒),超时则被释放(retired),默认:10分钟
max-lifetime: 1800000 # 连接的生命时长(毫秒),超时而且没被使用则被释放(retired),默认:30分钟 1800000ms
connection-test-query: SELECT 1 # 连接测试语句
redis:
#超时时间
timeout: 10000ms
#服务器地址
host: 192.168.242.138
#服务器端口
port: 6379
#数据库
database: 0
#密码
password: root
lettuce:
pool:
#最大连接数
max-active: 1024
#最大连接阻塞等待时间,默认 -1
max-wait: 10000ms
#最大空闲连接
max-idle: 200
#最小空闲连接
min-idle: 5
#rabbitmp配置
rabbitmq:
#用户名
username: guest
#密码
password: guest
#服务器地址
host: 192.168.242.138
#端口
port: 5672
#消息确认回调
publisher-/confirm/i-type: correlated
#消息失败回调
publisher-returns: true
#mybatis-plus配置
mybatis-plus:
#配置Mapper映射文件 #配置Mapper映射文件 resources下的mapper目录是我们手动添加的
mapper-locations: classpath*:/mapper/*Mapper.xml
# 配置Mybatis数据返回类型别名(默认别名为类名)
type-aliases-package: com.ppc.server.pojo # 配置Mybatis数据返回类型别名(默认别名为类名)
configuration:
# 关闭自动驼峰命名 在此关闭的原因是数据库建表使用了 “_”;
map-underscore-to-camel-case: false
#配置控制台打印日志Debug
logging:
level:
com.ppc.server.mapper: debug
# JWT 认证配置
jwt:
tokenHeader: Authorization #JWT存储的请求头
secret: yeb-secret #加解密使用的秘钥
expiration: 604800 #token七天不过期
tokenHead: Bearer #负载中拿到开头
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)