tags:

views:

680

answers:

1

We're using Grails but with an existing model layer and DAO layer. We have an app written already in Spring MVC, using Spring for IoC and also Security. I'm trying to port the control and view over to Grails as a proof of concept. I have Grails working fine with IoC but am having some trouble getting Grails to work with Spring Security. I'm using 0.5.1 of the Spring security plugin for grails. I have an xml file with all of the spring security settings that work fine with the Spring MVC app, but I'm having trouble getting it to work in Grails. If anyone has any experience using Grails with Spring Security but not using the domain part of the Spring security plugin, then please let me know. Any advice, websites etc would be helpful.

+1  A: 

You don't even need the Grails Spring Security Plugin,

You can integrate Spring Security 3 right into Grails as it all Spring under the hood any way.

You only have to place the Security jars in the lib folder, add two entries into the web.xml and copy over your security applictionContext

This way you can use your existing Spring Security in your grails project

This worked for me.

http://old.nabble.com/Baked-Beans%3A-Securing-Grails-with-Spring-Security-3!-td25339938.html#a25339938

http://blog.jayway.com/2009/11/23/spring-security-for-real-with-grails/comment-page-1

http://knol.google.com/k/grails-with-spring-security#

Daxon