1. 程式人生 > >Caused by: java.lang.ClassNotFoundException: Cannot find class: com.github.pagehelper.PageIntercepto

Caused by: java.lang.ClassNotFoundException: Cannot find class: com.github.pagehelper.PageIntercepto

今天使用pageHelper一直報這個錯誤


可能原因1:jar包和引數配置不匹配的問題

參考這個部落格

http://blog.csdn.net/zhuliliang/article/details/73650782



但之前測試過,確定不是上面的問題。我用的pageHelper5.0.0. mybatis裡配置<plugin interceptor="com.github.pagehelper.PageInterceptor">

那是什麼問題很奇怪。

去targer生成 的專案裡看了看lib中的pageHelper的版本發現還是3.4.2.

原來是新版本jar沒有覆蓋舊版本jar,需要到target去手動刪除或clean專案。因為我用的eclipse   clean專案不成功(因為下面有tomcat外掛)。只能手工clean(刪除target。)



然後我以為這樣就ok了。

沒想到還是不行。

重新整理還是不管用。然後刪除了Repository中的檔案,全部重新編譯。終於不報錯了。