我有一个使用Spring和IntelliJ的Web应用程序项目,到目前为止它一直运行良好,但今天我尝试运行它并开始给我这个错误
这只是一小部分
Error:(27, 29) java: cannot find symbol
symbol: class RequestParam
location: class com.eina.as.controladores.ControladorHome
Error:(8, 47) java: package org.springframework.web.bind.annotation does not exist
Error:(19, 6) java: cannot find symbol
symbol: class RequestMapping
location: class com.eina.as.controladores.ControladorHome
Error:(25, 6) java: cannot find symbol
symbol: class RequestMapping
location: class com.eina.as.controladores.ControladorHome
Error:(42, 26) java: cannot find symbol
symbol: class RequestParam
location: class com.eina.as.controladores.ControladorHome
Error:(28, 29) java: cannot find symbol
symbol: class RequestParam
location: class com.eina.as.controladores.ControladorHome
Error:(6, 38) java: package org.springframework.stereotype does not exist
Error:(9, 47) java: package org.springframework.web.bind.annotation does not exist
Error:(44, 25) java: cannot find symbol
symbol: class HttpServletRequest
location: class com.eina.as.controladores.ControladorHome
Error:(43, 26) java: cannot find symbol
symbol: class RequestParam
location: class com.eina.as.controladores.ControladorHome
Error:(11, 26) java: package javax.servlet.http does not exist
Error:(41, 6) java: cannot find symbol
symbol: class RequestMapping
location: class com.eina.as.controladores.ControladorHome
Error:(29, 29) java: cannot find symbol
symbol: class RequestParam
location: class com.eina.as.controladores.ControladorHome
Error:(16, 2) java: cannot find symbol
symbol: class Controller
Error:(7, 47) java: package org.springframework.web.bind.annotation does not exist
Error:(26, 29) java: cannot find symbol
symbol: class RequestParam
location: class com.eina.as.controladores.ControladorHome
还有更多错误,但它们与上述基本相同。我不知道发生了什么,我试图重新导入“pom.xml”,但它什么也没做。我已经删除并克隆了几次项目。
提前致谢
答案 0 :(得分:0)
清理maven项目。然后更新项目快照或更新maven项目。还要检查m2目录中的依赖项。然后再次重建项目。