关于javaweb项目突然找不到包的问题

使用了是idea编译器,几天没用,再打开项目的时候发现有问题,引用不到项目中新建的类了。


解决这个问题比较简单,将java文件设为source root就可以了。

然后又来了个问题,找不到spring文件,关键我明明以前有的。查看了下文件夹,确实有。

这是maven出了问题。需要找到pom.xml,右键,add as maven project。

再运行,又报错。。。这是artifact的问题,因为我们之前改的东西没加进去。

27-Feb-2018 21:29:54.303 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
27-Feb-2018 21:29:54.305 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
[2018-02-27 09:29:54,325] Artifact unnamed: Error during artifact deployment. See server log for details.

选到相关文件,右键,put into。。。



再次运行,好了。心疼自己,搞了两天,终于找到问题,但为什么会这样还是不知道。

猜你喜欢

转载自blog.csdn.net/hehangjiang/article/details/79393455