Grails 3.2.8 doesn't seem to have dependency injection working for domain classes by default.
When I create a new app and add Spring Security Core 3.1.1 with the following println:
protected void encodePassword() {
println "springSecurityService == null? ${(springSecurityService==null).toString()}"
password = springSecurityService?.passwordEncoder ? springSecurityService.encodePassword(password) : password
}
I get:
springSecurityService == null? true
If I try creating and injecting a service similarly, I get the same null value. Is there a good workaround?