1874
1874
FE Engineer
桌游布道者
有粤语歌就不会有世界末日

Mybatis分页插件警告解决办法

1874 - 2019-02-08 - 问题记录 / Java
2019-2-8|最后更新: 2023-4-10|
type
Post
status
Published
date
Feb 8, 2019
slug
ywdq07
summary
category
问题记录
tags
Java
创建时间
Apr 7, 2023 07:15 PM
更新时间
Apr 10, 2023 05:48 AM
password
icon
Task List
在使用springmvc+mybatis分页插件pagehelper时,只在业务层引用了 mybatis 的分页插件的 jar 包而表现层接收时没有引用,会报这样的警告:
警告: Hessian/Burlap: 'com.github.pagehelper.Page' is an unknown class in WebappClassLoader context: delegate: false repositories: ----------> Parent Classloader: ClassRealm[plugin>org.apache.tomcat.maven:tomcat7-maven-plugin:2.2 java.lang.ClassNotFoundException: com.github.pagehelper.Page
解决办法:mybatis的分页pagehelper插件依赖于mybatis的相关 jar 包,因此解决办法是在表现层同时加入分页pagehelperjar包和mybatis的相关 jar 包,如下:
<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> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> </dependency>
注解式配置dubbo服务Seven的成长笔记【第6篇】