配置(MySQL 8.0)
properties:
server.port=8088
server.tomcat.uri-encoding=UTF-8
spring.mvc.date-format=yyyy-MM-dd
# 禁用缓存
spring.thymeleaf.cache=false
spring.datasource.url=jdbc:mysql://localhost:3306/test?characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=true
spring.datasource.username=
spring.datasource.password=
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# 指定连接池中的最大的活跃连接数
spring.datasource.tomcat.max-active=20
# 指定连接池最大的空闲连接
spring.datasource.tomcat.max-idle=8
# 指定必须保持连接的最小值
spring.datasource.tomcat.min-idle=8
# 指定启动连接池是,初始建立的连接数量
spring.datasource.tomcat.initial-size=10
# JPA 持久化设计
# 指定数据库的类型
spring.jpa.database=MySQL
# 指定是否在日志中显示SQL语句
spring.jpa.show-sql=true
# 指定自动 创建|更新|验证 数据表结构等配置,配置成update
# 指定命名策略
spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl
spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy