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 包,因此解决办法是在表现层同时加入分页pagehelper
的jar
包和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>