SpringBoot中使用Mybatis-plus整合PageHelper分页插件踩坑
今天使用SpringBoot中使用Mybatis-plus整PageHelper分页插件把我给坑惨了,我报错的pom.xml配置如下,其它的依赖就忽略掉了
<!--pagehelper --><dependency><groupId>com.github.pagehelper</groupId><artifactId>pagehelper-spring-boot-starter</artifactId><version>1.2.10</version></dependency><!--mybatis-plus--><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.2.0</version></dependency>
经过一短时间的排查解决,发现其主要问题还是因为pagehelper-spring-boot-starter所依赖的mybatis-spring,mybatis与 mybatis-plus-boot-starter所依赖的mybatis-spring,mybatis发生冲突只要排除掉就可以了。
下面是我能正常跑的pom.xml配置
<!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper --><dependency><groupId>com.github.pagehelper</groupId><artifactId>pagehelper-spring-boot-starter</artifactId><version>1.2.10</version><!--使用spring boot2整合 pagehelper-spring-boot-starter必须排除一下依赖因为pagehelper-spring-boot-starter也已经在pom依赖了mybatis与mybatis-spring所以会与mybatis-plus-boot-starter中的mybatis与mybatis-spring发生冲突--><exclusions><exclusion><groupId>org.mybatis</groupId><artifactId>mybatis</artifactId></exclusion><exclusion><groupId>org.mybatis</groupId><artifactId>mybatis-spring</artifactId></exclusion></exclusions></dependency><!--mybatis-plus--><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.2.0</version></dependency>
SpringBoot中使用Mybatis-plus整合PageHelper分页插件踩坑相关推荐
- spring boot整合mybatis+通用mapper+pagehelper分页插件
spring boot整合mybatis+通用mapper+pagehelper分页插件 pom依赖 <?xml version="1.0" encoding="U ...
- SpringBoot整合PageHelper分页插件
首先新建项目 第一步: 第二步: 然后手动添加PageHelper分页插件依赖 <dependency><groupId>com.github.pagehelper</g ...
- SpringBoot入门篇--整合mybatis+generator自动生成代码+druid连接池+PageHelper分页插件
我们这一一篇博客讲的是如何整合Springboot和Mybatis框架,然后使用generator自动生成mapper,pojo等文件.然后再使用阿里巴巴提供的开源连接池druid,这个连接池的好处我 ...
- Springboot 系列(十二)使用 Mybatis 集成 pagehelper 分页插件和 mapper 插件
前言 在 Springboot 系列文章第十一篇里(使用 Mybatis(自动生成插件) 访问数据库),实验了 Springboot 结合 Mybatis 以及 Mybatis-generator 生 ...
- springboot中的mybatis是如果使用pagehelper的
springboot中的mybatis是如果使用pagehelper的 springboot中使用其他组件都是基于自动配置的AutoConfiguration配置累的,pagehelper插件也是一样 ...
- Springboot集成mybatis通用Mapper与分页插件PageHelper
Springboot集成mybatis通用Mapper与分页插件PageHelper 插件介绍 通用 Mapper 是一个可以实现任意 MyBatis 通用方法的框架,项目提供了常规的增删改查操作以及 ...
- springboot2.0.5集成mybatis(PageHelper分页插件、generator插件使用)
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/zab635590867/article ...
- spring boot+mybatis+thymeleaf+pagehelper分页插件实现分页功能
文章目录 前言 正文 业务场景 后端 pom.xml application.yml 实体类video.java和User.java----映射VideoMapper.xml----VideoMapp ...
- MyBatis入门(九)注解开发(下) PageHelper分页插件
目录 一.二级缓存 二.一对一关联查询 三.一对多关联查询 四.注解开发与映射文件开发的对比 五.PageHelper分页插件 一.二级缓存 MyBatis默认开启一级缓存,接下来我们学习如何在注解开 ...
最新文章
- 大数据解决方案背后——开放架构才是未来
- python从入门到精通视频-python从入门到精通视频(大全60集)
- springboot+vue的前后端分离与合并方案
- 微信消息提醒与消息数字提示之BadgeView
- MATLAB教程(1) MATLAB 基础知识(2)
- 95-10-132-启动-TransactionCoordinator-源码
- IDEA中Maven项目中界面右边的Maven Projects窗口找不到不出来
- webpack4.0.1安装问题及解决方法
- 绚丽风车loading动效分析与实现!
- 阶段3 2.Spring_04.Spring的常用注解_2 常用IOC注解按照作用分类
- 华为oj题目c语言,【华为OJ平台习题】
- chloe.mysql 源码_[开源]无sql之旅-Chloe.ORM之增删查改
- 360 随身wifi安装服务器系统,win7系统无法安装360随身WiFi的解决方法
- 咸鱼Maya笔记—Maya 热键
- linux查看docker是否启动命令行,如何通过命令行查看docker服务是否已启动
- python爬虫超时重试_python爬虫怎么处理异常和超时?
- tableau高级绘图(六)--tableau绘制范围点图
- 聚磷酸酯-紫杉醇前药(PTX-PEEP)|聚姜黄素-二硫键-聚甲基丙烯酸二乙胺基乙酯-聚磺酸甜菜碱|齐岳生物
- 都掌握了吗?Kotlin技能小成
- 改注册表让Win10任务栏透明