spring-boot集成mybatis-plus
1) 引入相关jar包 <!-- 引入mybatis-plus包 --> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>${mybatis-plus.version}</version> </dependency> <!-- 引入mysql驱动包 --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> 2) 编写配置文件 spring: datasource: # driver-class-name: url: jdbc:mysql://127.0.0.1:3306/DEMO_DB?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&serverTimezone=GMT%2B8 username: root password: '123456' 3) 配置包扫描路径(必须,要不然启动报错) @SpringBootApplication @EnableWebMvc @ComponentScan("com