1. 在pom.xml数据库sdk版本设置
2. application.yml中进行数据库连接信息配置
spring: datasource: url: jdbc:mysql://localhost:3306/test1?characterEncoding=utf-8&serverTimezone=GMT%2B8 username: root password: 123456 driver-class-name: com.mysql.cj.jdbc.Driver mybatis: mapper-locations: classpath:mapper/*Mapper.xml type-aliases-package: com.test.elasticsearchdemo.domain
参考1:https://blog.csdn.net/m0_55578242/article/details/119027084
参考2:https://blog.csdn.net/qq_43141611/article/details/108024978
标签:xml,数据库,application,csdn,mysql,yml From: https://www.cnblogs.com/2008nmj/p/17198562.html