java.lang.NoClassDefFoundError: org/apache/ibatis/session/RowBounds

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/innovate1989/article/details/82949028

最近在学习dubbox的时候遇到了上面的问题,由于dubbox是发布服务然后由web层进行调用dubbox发布的服务的原因。web层是不会依赖于dao层的,因此查找了相关的资料发现是由于在web端引入了pagehelper插件,插件设置的方言为mysql,所以就找mybatis的资源.然而在web端根本用不到dao层的jar包.所以删除pagehelper即可.
  我试着找了一下发现web层的pom文件中确实引入了pagehelper插件,现在想起来当初是因为控制台报错找不到pageHelper所以就引入了。但是后来发现在web层去掉pagehelper依赖后重启项目还是报错,所以尝试着把dao层中的mybatis的相关jar包都添加到web层后,重启项目后发现好了,控制台不报错了。

<dependency>
   <groupId>com.github.pagehelper</groupId>
   <artifactId>pagehelper</artifactId>
</dependency>
<!-- Mybatis -->
<dependency>
     <groupId>org.mybatis</groupId>
     <artifactId>mybatis</artifactId>
</dependency>
<dependency>
     <groupId>org.mybatis</groupId>
     <artifactId>mybatis-spring</artifactId>
</dependency>
<dependency>
    <groupId>com.github.miemiedev</groupId>
   <artifactId>mybatis-paginator</artifactId>
</dependency>

参考资料
https://blog.csdn.net/fox867134650/article/details/82290860

猜你喜欢

转载自blog.csdn.net/innovate1989/article/details/82949028
今日推荐