Grails 3 and Spring Security Plugin

ⅰ亾dé卋堺 提交于 2019-11-28 06:23:05

The Spring Secuirty core plugin for Grails is not Grails 3 compatible. However, since Grails 3 is based on Spring Boot you can use the Spring Security Starter for Spring Boot instead.

This has been discussed on the Grails developers mailing list and going forward many Grails plugins will not be moved to Grails 3 and instead will be replaced by pure Spring solutions.

Update

Since this question was originally asked there has been a Spring Security plugin created for Grails 3.x. It can be found here: https://bintray.com/grails/plugins/spring-security-core/view

The "Spring Security Starter for Spring Boot" is a good starting point, but if you want to save yourself some time trying to figure out how to get it to work with Grails, check out this helpful blog post.

I wrote the blog post @Jamie referenced in his answer and I added a new blog post describing how to use the Gorm domain classes from Spring-Security-Core plugin from Grails 2.

dependencies {
     ...
     compile 'org.grails.plugins:spring-security-core:3.0.4'
     ...
}

This is what I used and it worked for me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!