未生成Grails Spring Security登录/注销控制器 [英] Grails Spring Security Login/Logout Controllers not generated

查看:175
本文介绍了未生成Grails Spring Security登录/注销控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在试着学习Grails和Spring Security插件。我使用Grails 2.3.0和springsecurity-RC2插件,并遵循Grails网站上的指南。

I am trying to learn Grails along with the Spring Security plugin. I am using Grails 2.3.0 with springsecurity-RC2 plugin and following the guide on the Grails website.

我遇到的问题是生成的LoginController.groovy和而不是在grails-app / controller中生成s2-quickstart脚本中的LogoutController.groovy文件,而是在target / work / springsecurity / grails-app / controller中生成。

The issue I am running into is that the generated LoginController.groovy and LogoutController.groovy files from the s2-quickstart script are not being generated in the grails-app/controller, instead they are in target/work/springsecurity/grails-app/controller.

这个问题在grails 2.1.5中似乎没有出现,但在2.2.4中。
是否有解决这些问题的方法或者我不需要它们?

This issue does not seem to occur in grails 2.1.5 but does in 2.2.4. Is there anyway for me to fix these issues or do I not need them?

推荐答案

这是设计。这些文件不再生成,它们包含在插件本身中。如果您需要修改它们,请将控制器和/或GSP复制到grails-app下相同位置的项目中,并在其中进行更改。应用程序始终可以使用这种方法覆盖插件类,因为Grails首先编译插件,然后编译应用程序。

This is by design. The files aren't generated anymore, they're included in the plugin itself. If you need to modify them, copy the controller and/or GSPs to your project in the same location under grails-app and make your changes there. Apps can always override plugin classes using this approach since Grails compiles plugins first, then the app.

这篇关于未生成Grails Spring Security登录/注销控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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