application.yml文件
server:
#端口
port: 8081
spring:
#数据库
datasource:
# 8版本mysql数据库:com.mysql.cj.jdbc.Driver
# 7版本mysql数据库:com.mysql.jdbc.Driver
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/db_base?usrUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: root
password: 123456
hikari:
#连接池名
pool-name: DateHikariCP
#最小空闲连接数
minimum-idle: 5
#空闲连接最大存活时间:默认10分钟
idle-timeout: 180000
#连接最大存活时间 。0表示永久成活 ,默认30分钟
max-lifetime: 1800000
#最大连接数 ,默认10
maximum-pool-size: 10
#从连接池返回的连接的自动提交
auto-commit: true
#连接超时时间
connection-timeout: 30000
#测试连接是否可用的查询语句
connection-test-query: SELECT 1
#mybatis -plus 配置
mybatis-plus:
#配置mapper映射文件
mapper-locations: classpath*:/mapper/*Mapper.xml
#配置mybatis 数据返回类型的别名
type-aliases-package: com.xxxx.server.pojo
configuration:
#自动驼峰命名
map-underscore-to-camel-case: false
##mybasit sql 打印
logging:
level:
com.xxxx.server.mapper:debug
jwt:
#JWT存储请求头
tokenHeader: Authorization
#加密使用的密钥
secret: yeb-secret
#超权限时间 60*60*24
expiration: 604800
#负载中拿到开头
tokenHead: Bearer