(1)使用Spring Boot默认的HikariDataSource数据源
spring.datasource.urljdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.username=root spring.datasource.password=LByf2544
(2)使用第三方的Druid数据源
spring.datasource.urljdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.username=root spring.datasource.password=LByf2544 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource