server:
port: 8080
spring:
datasource:
url: jdbc:mysql://localhost:3306/hotel?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
username: root
password: 123456
resources:
static-locations: classpath:/templates/,classpath:/static/
thymeleaf:
cache: false
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath:/mapper/*.xml
type-aliases-package: 实体类包路径
#日志
logging:
level:
root: info
file:
name: demo.log
path: logs
#PageHelper分页插件
pagehelper:
# 分页插件会自动检测当前的数据库链接,自动选择合适的分页方式(可以不设置)
helper-dialect: mysql
# 上面数据库设置后,下面的设置为true不会改变上面的结果(默认为true)
page-size-zero: true
reasonable: true
support-methods-arguments: true
params: count=countSql
贴个文件结构图,免得大家搞错了!