- Pom.xml添加依赖
引入mybatis-plus依赖,可以直接使用mybatis,不用在引入mybatis依赖
com.baomidou mybatis-plus-boot-starter3.4.1
- Mapper层集成BaseMapper
实现类注入相应mapper,便可使用相应方法
避免数据库映射实体类下划线问题,可以在配置文件中添加:
map-underscore-to-camel-case: true #数据库映射实体驼峰命名

引入mybatis-plus依赖,可以直接使用mybatis,不用在引入mybatis依赖
com.baomidou mybatis-plus-boot-starter3.4.1
实现类注入相应mapper,便可使用相应方法
避免数据库映射实体类下划线问题,可以在配置文件中添加:
map-underscore-to-camel-case: true #数据库映射实体驼峰命名