0

I am trying to use the Spring Security Core plugin in a Grails project using the Neo4j GORM plugin.

As far as I can see I have two options:

  1. Use the Spring Security Core plugin as is and persist it's data to say MySQL while using Neo4j for the rest of the application data.

  2. Use a custom UserDetailsService.

Does anyone have an example of the latter?

pjdv

2 Answers 2

1

You mean like the one in the documentation? http://grails-plugins.github.com/grails-spring-security-core/docs/manual/guide/11%20Custom%20UserDetailsService.html

1
  • Ah somehow missed that! Exactly what I was looking for, thank you! Jan 31, 2013 at 7:28
1

Since the Neo4j plugin is GORM compliant, spring-security-core's GormUserDetailsService should work out of the box.

5
  • Thanks Stefan - I have followed the instructions, but am now getting the following error: URI: /boo/j_spring_security_check Class: groovy.lang.MissingMethodException Message: No signature of method: org.neo4j.kernel.EmbeddedGraphDatabase.getNodeById() is applicable for argument types: (java.lang.String) values: [5SN1GGBbtU8KiwCMVtJP3w==] Possible solutions: getNodeById(long) Am I missing something very obvious? Feb 4, 2013 at 22:13
  • do you have a stacktrace for this? As a quick workaround you could probably do in BootStrap.groovy some metaprogramming magic: EmbeddedGraphDatabase.metaClass.getNodeById << { String id -> delegate .getNodeById(id as long)} Feb 5, 2013 at 17:21
  • @StefanArmbruster What if i am using Spring-data-neo4j instead of Neo4j plugin,can you provide any solution for this case? Oct 27, 2014 at 9:39
  • No, maybe file a separate question for this. Oct 27, 2014 at 10:45
  • @StefanArmbruster Ok,i tried neo4j plugin but in embedded mode it is giving error of file lock exception,here is a question for this stackoverflow.com/questions/26622802/file-lock-exception Oct 29, 2014 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.