springboot2.x版整合 druid数据源配置
1 2 3 4 5 6
| <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>1.1.17</version> </dependency>
|
1 2 3 4 5 6 7 8
| spring: datasource: druid: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://ip地址/数据库名?characterEncoding=utf-8 username: root password: root
|