yml配置: mybatis-plus: mapper-locations: classpath*:mappers/**/*.xml type-aliases-package: com.liang.demo.entity configuration: map-underscore-to-camel-case: true global-config: db-config: db-type: MYSQL id-type: 0
jar包: <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.0.6</version> </dependency>
启动类:
@SpringBootApplication @EnableTransactionManagement @MapperScan(value = {"com.liang.demo.mapper.**"}) public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } }