“Groovy:无法解决课堂......” (在LoginController.groovy中导入错误) [英] "Groovy:unable to resolve class ..." (import error in LoginController.groovy)
问题描述
我尝试使用:spring-security-core:2.0-RC2 (使用Grails版本2.3.1),但是拥有自己的 LoginController.groovy 。关注Burt的笔记(此处和 ),我将原始位置的LoginController.groovy复制到
对不起,如果这是一个微不足道的问题(仍然习惯于Grails),并感谢您的帮助!
$看起来像GGTS / STS并不完全知道该插件已安装,因为这些类来自插件依赖的两个罐子。尝试右键单击树中的项目节点并运行Grails Tools> Refresh Dependencies。如果这还不够,运行Project |清理以强制重新编译。
I am trying to use the ":spring-security-core:2.0-RC2" (using Grails version 2.3.1), but have my own LoginController.groovy. Following Burt's notes (here and here), I copied the LoginController.groovy from the original location at "myapp\target\work\plugins\spring-security-core-2.0-RC2\grails-app\controllers\grails\plugin\springsecurity" to my project location at "myapp\grails-app\controllers\com\company". Now I get a bunch of import error messages like "Groovy:unable to resolve class ..." (I have attached am image below showing all the imports giving errors). How do I take care of these errors?
Sorry if this is a trivial question (still getting used to Grails), and thank you for the help!
It looks like GGTS/STS isn't entirely aware that the plugin is installed, since those classes are from the two jars that the plugin depends on. Try right-clicking the project node in the tree and running Grails Tools > Refresh Dependencies. If that's not enough, run Project | Clean to force a full recompile.
这篇关于“Groovy:无法解决课堂......” (在LoginController.groovy中导入错误)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!