使用了是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。。。
再次運行,好了。心疼自己,搞了兩天,終於找到問題,但爲什麼會這樣還是不知道。