I need to use the Spring Security User, Role/Authority and the UserRole-join classes both in a Grails application and a Java app.
Where and how should I implement/generate these classes?
If I use the generated GORM/Groovy classes from Grails, how would I import and use them in the Java app (where I handle the Hibernate session factory myself)?
Or would I implement them in Java as Hibernate Entities and import/use them in the Grails app? (I have done this successfully before with 'normal' (none-Spring Security) classes, but I would not know whether/how to implement the get, create, remove, removeAll methods that the Spring Security Core plugin has generated)
I've an grails app where your second option is used.
There is an separate module for data manipulations, because this project have two different standalone apps (grails website and backend processor with REST api), and also it uses MongoDB (so, all this GORM magic doesn't help there).
And Spring Security used on both sides (web and backend), with different implementations, but everything works fine. Actually it requires some little work on implementing required beans (look inside Spring Security Core plugin), but it isn't so complicated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With