配置文件
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
spring.datasource.url = jdbc:mysql://localhost:3306/test?characterEncoding=utf-8&serverTimezone=UTC&useSSL=false
spring.datasource.username = root
spring.datasource.password = ysq123
mybatis.mapper-locations= classpath:mapping/*.xml
mybatis.type-aliases-package=com.xxxx.xxxx.bean
mybatis-plus.mapper-locations=classpath:mapping/*.xml
spring.thymeleaf.enabled=true
spring.thymeleaf.encoding=utf-8
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.cache=false
spring.thymeleaf.mode=HTML5
spring.thymeleaf.suffix=.html
其中,
spring.datasource.url = jdbc:mysql://localhost:3306/**test**?characterEncoding=utf-8&serverTimezone=UTC&useSSL=false
加粗字体为你自身数据库名,username与password都为自己的账号密码。