Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails import SpringSecurityUtils unresolve class

Using Grails 2.4.4. So I wanted to create a custom LoginController.groovy and I copied the file from an old project to the controller directory (no package). It can't seem to resolve the class for SpringSecurityUtils.

import org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils

One stackoverflow answer mentioned using, but this also did not work.

import grails.plugins.springsecurity.SpringSecurityUtils //Did not work

=> Groovy:unable to resolve class org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils

I do see the spring-securty-core.jar in the build path. Running >grails run-app from CLI also has the same error.

like image 454
ibaralf Avatar asked Jul 04 '26 03:07

ibaralf


1 Answers

Verify the package name again. Its

grails.plugin.springsecurity.SpringSecurityUtils

Notice plugin instead of plugins in package.

like image 171
dmahapatro Avatar answered Jul 07 '26 04:07

dmahapatro