“Groovy:无法解决课堂......” (在LoginController.groovy中导入错误) [英] "Groovy:unable to resolve class ..." (import error in LoginController.groovy)

查看:127
本文介绍了“Groovy:无法解决课堂......” (在LoginController.groovy中导入错误)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用:spring-security-core:2.0-RC2 (使用Grails版本2.3.1),但是拥有自己的 LoginController.groovy 。关注Burt的笔记(此处 ),我将原始位置的LoginController.groovy复制到到我的项目位置,位于 myapp\grails-app\controllers\com \company 。现在,我收到了一堆导入错误消息,比如 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆