Home Initializing a filter in Grails
 I'm running Grails 2.3.3 and have introduced a filter: class HvFilters { def HvLoginDetailsService def filters = { all(controller:'*', action:'*') { before = { } after = { Map model -> model.myLoginDetails = HvLoginDetailsService.myLoginDetails() } } } }  When I build using a run-app I get this error: 2018-02-01 15:54:38,710 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: Method on class [homevu1.HvFilters] was used outside of a Grails application.  I've looked at various posts etc. regarding this GrailsContextLoader error - all signs point to the need to initialize the filter in Bootstrap - I had a go but still getting the same error: SpringSecurityUtils.clientRegisterFilter( 'HvFilters', SecurityFilterPosition.PRE_AUTH_FILTER.order)