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

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

问题描述

我正在尝试学习 Grails 和 Spring Security 插件.我正在使用带有 springsecurity-RC2 插件的 Grails 2.3.0,并遵循 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.

我遇到的问题是从 s2-quickstart 脚本生成的 LoginController.groovy 和 LogoutController.groovy 文件没有在 grails-app/controller 中生成,而是在 target/work/springsecurity/grails 中- 应用程序/控制器.

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天全站免登陆