在 STS 上,一个类引用在相同 package 中另一个类,但是报 cannot be resolved to a type 错误。
解决方法 :
Alternatively, you can highlight the project :
Choose
Clean ...
from Project menu and if you have activated theBuild Automatically
option (in the same menu), the classes will be generated anew.
参考资料 :