java.lang.ClassNotFoundException: com.github.pagehelper.PageHelper


引入的依赖版本
<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>pagehelper-spring-boot-starter</artifactId>
    <version>1.4.1</version>
</dependency>
spring版本

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>

问题描述:

编译的时候没有任何错误,项目运行PageHelper.startPage(1, 2)的时候报错找不到类,网上说pagehelper的版本是spring的版本,实际将版本号改成2.6.7会报错引入不了,在libraries里也能看到有jar包,这是怎么回事呢?

将项目重新打包就好了