我刚刚在Grails 3.0.1中实现了Spring Boot Security。我想自定义默认的Spring Boot登录表单,但是在任何地方都找不到login.html。
我已经阅读了各种教程和文档,login.html位置应位于项目中不存在的“src / main / resources / templates / login.html”中。
这是在实施Spring Boot to Grails 3.0.1时遵循的3部分教程系列。
http://spiesdavid.blogspot.fi/2015/03/grails-3-app-with-security-part-1.html
最佳答案
我解决了这个问题,有很多工作要做。
我需要创建2个 Controller ,其中一个是我新登录页面的 Controller ,另一个是提交登录表单(空)。
下一步是创建一个拦截器,它将拦截对第二个 Controller 的请求,在before方法中,它将执行登录过程(它必须具有对AuthenticationManager的引用,默认情况下为ProviderManager)
最后,我创建了一个新的身份验证提供程序,负责进行身份验证,并且必须将其分配给AuthenticationManager。
关于spring - Spring Boot Security login.html在Grails 3.0中的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30637848/