interface GrailsApplicationLifeCycle
API which plugins implement to provide behavior in defined application lifecycle hooks. The GrailsApplicationLifeCycle.beanRegistrar method can be used to register Spring beans.
| Type Params | Return Type | Name and description |
|---|---|---|
|
BeanRegistrar |
beanRegistrar()Sub classes should override to register beans with the Spring Framework org.springframework.beans.factory.BeanRegistry using a BeanRegistrar. |
|
abstract void |
doWithApplicationContext()Invoked once the org.springframework.context.ApplicationContext has been refreshed and after {#doWithDynamicMethods()} is invoked. |
|
abstract void |
doWithDynamicMethods()Invoked once the org.springframework.context.ApplicationContext has been refreshed in a phase where plugins can add dynamic methods. |
|
abstract groovy.lang.Closure |
doWithSpring()Sub classes should override to provide implementations |
|
abstract void |
onConfigChange(java.util.Map<java.lang.String, java.lang.Object> event)Invoked when the application configuration changes |
|
abstract void |
onShutdown(java.util.Map<java.lang.String, java.lang.Object> event)Invoked when the org.springframework.context.ApplicationContext is closed |
|
abstract void |
onStartup(java.util.Map<java.lang.String, java.lang.Object> event)Invoked once all prior initialization hooks: GrailsApplicationLifeCycle.doWithSpring, GrailsApplicationLifeCycle.doWithDynamicMethods and GrailsApplicationLifeCycle.doWithApplicationContext |
Sub classes should override to register beans with the Spring Framework org.springframework.beans.factory.BeanRegistry using a BeanRegistrar. This is the modern, Spring-native replacement for the doWithSpring() bean builder DSL.
The returned registrar is applied before Spring Boot auto-configuration is processed, so
beans registered here take precedence over Boot's @ConditionalOnMissingBean defaults.
null if none (the default)Invoked once the org.springframework.context.ApplicationContext has been refreshed and after {#doWithDynamicMethods()} is invoked. Subclasses should override
Invoked once the org.springframework.context.ApplicationContext has been refreshed in a phase where plugins can add dynamic methods. Subclasses should override
Sub classes should override to provide implementations
Invoked when the application configuration changes
event - The eventInvoked when the org.springframework.context.ApplicationContext is closed
event - The eventInvoked once all prior initialization hooks: GrailsApplicationLifeCycle.doWithSpring, GrailsApplicationLifeCycle.doWithDynamicMethods and GrailsApplicationLifeCycle.doWithApplicationContext
event - The event