@SuppressWarnings({ "rawtypes", "unchecked" })
	protected void applyInitializers(ConfigurableApplicationContext context) {
		for (ApplicationContextInitializer initializer : getInitializers()) {
			Class<?> requiredType = GenericTypeResolver.resolveTypeArgument(
					initializer.getClass(), ApplicationContextInitializer.class);
			Assert.isInstanceOf(requiredType, context, "Unable to call initializer.");
			initializer.initialize(context);
		}
	}
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) protected void applyInitializers ( ConfigurableApplicationContext context ) { for ( ApplicationContextInitializer initializer : getInitializers ( ) ) { Class < ? > requiredType = GenericTypeResolver . resolveTypeArgument ( initializer . getClass ( ) , ApplicationContextInitializer . class ) ; Assert . isInstanceOf ( requiredType , context , "Unable to call initializer." ) ; initializer . initialize ( context ) ; } }
Apply any {@link ApplicationContextInitializer}s to the context before it is
refreshed.
@param context the configured ApplicationContext (not refreshed yet)
@see ConfigurableApplicationContext#refresh()