maven管理jar包后,依然找不到Jar包或者ClassNotFound的解决,比如如下错误 :
java.lang.ClassNotFoundException:
com.github.pagehelper.PageInterceptor at…
解决方法如下:
- Open the project’s properties (e.g., right-click on the project’s name in the project explorer and select “Properties”)
打开项目的配置文件(在项目列表,右击项目名称,选择"Properties")
- select “Deployment Assembly”
选择"部署程序集"
- Click the “Add…” button on the right margin
点击右边的“新增…”按钮
- Select “Java Build Path Entries” from the menu of Directive Type and click “Next”
选择指令种类菜单下面的“Java生成路径项”,并选择“下一步”
- Select “Maven Dependencies” from the Java Build Path Entries menu and click “Finish”.
勾选“Java生成路径项”菜单中的Maven依赖,并点击“结束”。