Document Listener/Initializer changes

Fixes gh-312
This commit is contained in:
Phillip Webb 2014-02-04 12:26:14 -08:00
parent 8ede73066d
commit 69f7f38403
1 changed files with 8 additions and 12 deletions

View File

@ -538,7 +538,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
protected void init(AuthenticationManagerBuilder builder) { protected void init(AuthenticationManagerBuilder builder) {
builder.inMemoryAuthentication().withUser("barry"); // ... etc. builder.inMemoryAuthentication().withUser("barry"); // ... etc.
} }
// ... other stuff for application security // ... other stuff for application security
} }
@ -1026,22 +1026,18 @@ additional ones:
`META-INF/spring.factories` and packaging a jar file that the `META-INF/spring.factories` and packaging a jar file that the
applications all use as a library applications all use as a library
Any `ApplicationContextInitializer` registered programmatically or via The `SpringApplication` sends some special `ApplicationEvents` to the
`spring.factories` that is also an `ApplicationListener` will be listeners (even some before the context is created), and then registers
automatically cross registered (and vice versa for listeners that are the listeners for events published by the `ApplicationContext` as well:
also initializers). The `SpringApplication` sends some special
`ApplicationEvents` to the listeners (even some before the context is
created), and then registers the listeners for events published by the
`ApplicationContext` as well:
* `SpringApplicationStartEvent` at the start of a run, but before any * `ApplicationStartedEvent` at the start of a run, but before any
processing except the registration of listeners and initializers. processing except the registration of listeners and initializers.
* `SpringApplicationEnvironmentAvailableEvent` when the `Environment` * `ApplicationEnvironmentPreparedEvent` when the `Environment`
to be used in the context is known, but before the context is to be used in the context is known, but before the context is
created. created.
* `SpringApplicationBeforeRefreshEvent` just before the refresh is * `ApplicationPreparedEvent` just before the refresh is
started, but after bean definitions have been loaded. started, but after bean definitions have been loaded.
* `SpringApplicationErrorEvent` if there is an exception on startup. * `ApplicationFailedEvent` if there is an exception on startup.
## Build An Executable Archive with Ant ## Build An Executable Archive with Ant