i read this, this and this but not resolve my problem.
This is my error:
Cannot invoke method getCurrentUser() on null object. Stacktrace follows:
Message: Cannot invoke method getCurrentUser() on null object
My code:
import org.springframework.dao.DataIntegrityViolationException
import grails.plugin.springsecurity.annotation.Secured;
@Secured('ROLE_SYSTEMADMIN')
class InstanceController {
...
def save() {
def instanceInstance = new Instance(params)
def springSecurityService
println("user is"+springSecurityService.getCurrentUser());
...
I use:
- GGTS 3.4.0.
- compile ':spring-security-core:2.0-RC2'
I'm logged. I'm sure. Thanks for reply.
Raziel