gpc / grails-audit-logging-plugin

The Grails Audit Logging Plugin
Apache License 2.0
50 stars 60 forks source link

springSecurityService bean not detected for automatic auditRequestResolver bean config #209

Open robertoschwald opened 3 years ago

robertoschwald commented 3 years ago

Seems in Grails 3.3.10 the order of plugin initialisation is changed even if loadAfter = ['springSecurityCore'] is set, so the springSecurityService bean is not detected in AuditLoggingGrailsPlugin some times. Therefore, the DefaultAuditRequestResolver is initialized instead of the SpringSecurityRequestResolver

Workaround for now is to manually register the SpringSecurityRequestResolver in resources.groovy.

    auditRequestResolver(SpringSecurityRequestResolver) {
        springSecurityService = ref('springSecurityService')
    }