Wednesday, August 27, 2008

Acegi and Groovy Class Packages

With all of the tutorials and examples for Grails there is often no reference to packaging your Groovy classes.

So, I decided to convert all of my project into packages including Acegi.

Using IntelliJ 7.04 & JetGroovy plugin v1.6.18593, I was able to refactor most of my classes without issue. Service classes required me to add the imports manually... no problem there. Of course its odd that I had to manually add imports to java.util.*

Acegi classes required to add the package to the class declaration within grails-app/conf/SecurityConfig.groovy

loginUserDomainClass = "com.mycorp.projname.security.User"
authorityDomainClass = "com.mycorp.projname.security.Role"
requestMapClass = "com.mycorp.projname.security.Requestmap"

(thanks to Burt Beckwith)

No comments: