带有maven的spring项目中的ClassNotFoundException

时间:2017-07-28 07:03:15

标签: spring tomcat jar

我用maven创建了一个spring项目,它运行正常。我正在尝试将jar文件添加到项目中,eclipse不会给出任何错误,但是当我启动服务器并尝试访问使用该jar文件中的类的页面时,我得到了一个classNotFound异常。

我的步骤是..

1 - I put the jar file in src->main->resources
2 - I added it to build path by right clicking and saying add to build path.
3 - I add the project to tomcat and start the server

我看了tomcat部署目录,而.jar文件出现在classes目录中。当我把文件从类复制到lib(有maven下载的库)项目工作正常。

0 个答案:

没有答案