是不是有时候会遇到莫名其妙的飘红报错,但是代码却可以正常运行
这个原因是因为IDEA有缓存,只需要刷新一下缓存就好了
解决办法:
file --> Invalidate Caches /Restart. --> Invalidate and Restart
然后重启IDEA,OK~困扰多年的问题解决!
现象2
idea---pom没有错误,但是代码依然报红问题的解决方案
**解决方案 alter+enter将jar包变为classpath; **
idea导入maven项目报错的思路:
1.本地maven的环境变量配置是否正确;
2,idea--》setting---》maven
重点看这里改没改
或者设置自动导入项目
3.是否导入pom文件,将pom文件作为as maven project运行
4,idea不够智能没有将maven的jar包自动转为classpath
需要手动添加
/** 请忽略此处
* Implicitly sets a tag for the operations, legacy support (read description).
* <p>
* In swagger-core 1.3.X, this was used as the 'path' that is to host the API Declaration of the
* resource. This is no longer relevant in swagger-core 1.5.X.
* <p>
* If {@link #tags()} is <i>not</i> used, this value will be used to set the tag for the operations described by this
* resource. Otherwise, the value will be ignored.
* <p>
* The leading / (if exists) will be removed.
*
* @return tag name for operations under this resource, unless {@link #tags()} is defined.
*/
版权归原作者 modernk 所有, 如有侵权,请联系我们删除。