springboot项目redis+mybatis+热部署 application.yml通用配置
server:
port: 8081
servlet:
context-path: /demo
session:
timeout: 30m
tomcat:
uri-encoding: UTF-8
spring:
application:
name: demo
datasource:
url: jdbc:mysql://localhost:3306/testdb?serverTimezone=UTC #数据库连接url
usernaem: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver #数据库驱动的名称
max-idle: 10 #最大空闲数,数据库连接的最大空闲时间。超过空闲时间,数据库连接将被标记为不可用,然后被释放。设为0表示无限制。
max-wait: 5 #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
initial-size: 5 #初始连接数
jpa:
show-sql: true
properties:
hibernate:
format_sql: true
devtools:
restart:
enabled: true #设置开启热部署
additional-paths: src/main/java #重启目录
exclude: src/main/resources/static #排除目录
freemarker:
cache: false #页面不加载缓存,修改即时生效
#mybatis配置
mybatis:
type-aliases-package: com.gxuwz.competition.mapper
mapper-locations: mapper/*.xml
#redia配置
redis:
host: 127.0.0.1
port: 6379
password: 123456
jedis:
pool:
max-active: 8
max-wait: -1
max-idle: 5
min-idle: 0
timeot=ut: 2000
database: 0