Druid 的整合 springboot mybaits
创建 SpringBoot 项目 在整合 Druid 之前,需要先创建一个 SpringBoot 和 MyBatis 的项目,先来观察一下,它默认是否使用了数据库连接池,使用了什么数据库连接池。然后,再来整合 Druid 这款数据库连接池到项目当中。 创建 SpringBoot 和 Mybatis 的项目很简单,通过向导即可完成( 完整项目项目www.fhadmin.org)。创建项目后的依赖如下: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.3</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency>