如果还不好使,接着试方法二
左上角点击File —>Project Structure
添加tomocat:modules —>dependencies—>+号—>library
然后再用方法一,清空缓存重启
出现此类错误,也可能是因为代码中使用了lombok注解功能而导致,笔者也是在网上看到了这个提示,把解决点放在了这个上面
第一个办法:
进入intellij idea的setting ----compile(直接搜索) ---Annotation Processors---Enable annotation processing
第二个办法:安装lombok插件
进入intellij idea的setting ----compile(直接搜索) ---lombok,点击update,下载好插件,然后重启idea
IDEA+cannot resolve method"XX"问题
原文:https://www.cnblogs.com/wffzk/p/13789491.html