Java Code Examples for org.springframework.context.ApplicationContextInitializer#initialize()

The following examples show how to use org.springframework.context.ApplicationContextInitializer#initialize() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContextLoader.java    From spring-analysis-note with MIT License 6 votes vote down vote up
/**
 * Customize the {@link ConfigurableWebApplicationContext} created by this
 * ContextLoader after config locations have been supplied to the context
 * but before the context is <em>refreshed</em>.
 * <p>The default implementation {@linkplain #determineContextInitializerClasses(ServletContext)
 * determines} what (if any) context initializer classes have been specified through
 * {@linkplain #CONTEXT_INITIALIZER_CLASSES_PARAM context init parameters} and
 * {@linkplain ApplicationContextInitializer#initialize invokes each} with the
 * given web application context.
 * <p>Any {@code ApplicationContextInitializers} implementing
 * {@link org.springframework.core.Ordered Ordered} or marked with @{@link
 * org.springframework.core.annotation.Order Order} will be sorted appropriately.
 * @param sc the current servlet context
 * @param wac the newly created application context
 * @see #CONTEXT_INITIALIZER_CLASSES_PARAM
 * @see ApplicationContextInitializer#initialize(ConfigurableApplicationContext)
 */
protected void customizeContext(ServletContext sc, ConfigurableWebApplicationContext wac) {
	List<Class<ApplicationContextInitializer<ConfigurableApplicationContext>>> initializerClasses =
			determineContextInitializerClasses(sc);

	for (Class<ApplicationContextInitializer<ConfigurableApplicationContext>> initializerClass : initializerClasses) {
		Class<?> initializerContextClass =
				GenericTypeResolver.resolveTypeArgument(initializerClass, ApplicationContextInitializer.class);
		if (initializerContextClass != null && !initializerContextClass.isInstance(wac)) {
			throw new ApplicationContextException(String.format(
					"Could not apply context initializer [%s] since its generic parameter [%s] " +
					"is not assignable from the type of application context used by this " +
					"context loader: [%s]", initializerClass.getName(), initializerContextClass.getName(),
					wac.getClass().getName()));
		}
		this.contextInitializers.add(BeanUtils.instantiateClass(initializerClass));
	}

	AnnotationAwareOrderComparator.sort(this.contextInitializers);
	for (ApplicationContextInitializer<ConfigurableApplicationContext> initializer : this.contextInitializers) {
		initializer.initialize(wac);
	}
}
 
Example 2
Source File: ContextLoader.java    From java-technology-stack with MIT License 6 votes vote down vote up
/**
 * Customize the {@link ConfigurableWebApplicationContext} created by this
 * ContextLoader after config locations have been supplied to the context
 * but before the context is <em>refreshed</em>.
 * <p>The default implementation {@linkplain #determineContextInitializerClasses(ServletContext)
 * determines} what (if any) context initializer classes have been specified through
 * {@linkplain #CONTEXT_INITIALIZER_CLASSES_PARAM context init parameters} and
 * {@linkplain ApplicationContextInitializer#initialize invokes each} with the
 * given web application context.
 * <p>Any {@code ApplicationContextInitializers} implementing
 * {@link org.springframework.core.Ordered Ordered} or marked with @{@link
 * org.springframework.core.annotation.Order Order} will be sorted appropriately.
 * @param sc the current servlet context
 * @param wac the newly created application context
 * @see #CONTEXT_INITIALIZER_CLASSES_PARAM
 * @see ApplicationContextInitializer#initialize(ConfigurableApplicationContext)
 */
protected void customizeContext(ServletContext sc, ConfigurableWebApplicationContext wac) {
	List<Class<ApplicationContextInitializer<ConfigurableApplicationContext>>> initializerClasses =
			determineContextInitializerClasses(sc);

	for (Class<ApplicationContextInitializer<ConfigurableApplicationContext>> initializerClass : initializerClasses) {
		Class<?> initializerContextClass =
				GenericTypeResolver.resolveTypeArgument(initializerClass, ApplicationContextInitializer.class);
		if (initializerContextClass != null && !initializerContextClass.isInstance(wac)) {
			throw new ApplicationContextException(String.format(
					"Could not apply context initializer [%s] since its generic parameter [%s] " +
					"is not assignable from the type of application context used by this " +
					"context loader: [%s]", initializerClass.getName(), initializerContextClass.getName(),
					wac.getClass().getName()));
		}
		this.contextInitializers.add(BeanUtils.instantiateClass(initializerClass));
	}

	AnnotationAwareOrderComparator.sort(this.contextInitializers);
	for (ApplicationContextInitializer<ConfigurableApplicationContext> initializer : this.contextInitializers) {
		initializer.initialize(wac);
	}
}
 
Example 3
Source File: ContextLoader.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Customize the {@link ConfigurableWebApplicationContext} created by this
 * ContextLoader after config locations have been supplied to the context
 * but before the context is <em>refreshed</em>.
 * <p>The default implementation {@linkplain #determineContextInitializerClasses(ServletContext)
 * determines} what (if any) context initializer classes have been specified through
 * {@linkplain #CONTEXT_INITIALIZER_CLASSES_PARAM context init parameters} and
 * {@linkplain ApplicationContextInitializer#initialize invokes each} with the
 * given web application context.
 * <p>Any {@code ApplicationContextInitializers} implementing
 * {@link org.springframework.core.Ordered Ordered} or marked with @{@link
 * org.springframework.core.annotation.Order Order} will be sorted appropriately.
 * @param sc the current servlet context
 * @param wac the newly created application context
 * @see #CONTEXT_INITIALIZER_CLASSES_PARAM
 * @see ApplicationContextInitializer#initialize(ConfigurableApplicationContext)
 */
protected void customizeContext(ServletContext sc, ConfigurableWebApplicationContext wac) {
	List<Class<ApplicationContextInitializer<ConfigurableApplicationContext>>> initializerClasses =
			determineContextInitializerClasses(sc);

	for (Class<ApplicationContextInitializer<ConfigurableApplicationContext>> initializerClass : initializerClasses) {
		Class<?> initializerContextClass =
				GenericTypeResolver.resolveTypeArgument(initializerClass, ApplicationContextInitializer.class);
		if (initializerContextClass != null && !initializerContextClass.isInstance(wac)) {
			throw new ApplicationContextException(String.format(
					"Could not apply context initializer [%s] since its generic parameter [%s] " +
					"is not assignable from the type of application context used by this " +
					"context loader: [%s]", initializerClass.getName(), initializerContextClass.getName(),
					wac.getClass().getName()));
		}
		this.contextInitializers.add(BeanUtils.instantiateClass(initializerClass));
	}

	AnnotationAwareOrderComparator.sort(this.contextInitializers);
	for (ApplicationContextInitializer<ConfigurableApplicationContext> initializer : this.contextInitializers) {
		initializer.initialize(wac);
	}
}
 
Example 4
Source File: ContextLoader.java    From spring4-understanding with Apache License 2.0 6 votes vote down vote up
/**
 * Customize the {@link ConfigurableWebApplicationContext} created by this
 * ContextLoader after config locations have been supplied to the context
 * but before the context is <em>refreshed</em>.
 * <p>The default implementation {@linkplain #determineContextInitializerClasses(ServletContext)
 * determines} what (if any) context initializer classes have been specified through
 * {@linkplain #CONTEXT_INITIALIZER_CLASSES_PARAM context init parameters} and
 * {@linkplain ApplicationContextInitializer#initialize invokes each} with the
 * given web application context.
 * <p>Any {@code ApplicationContextInitializers} implementing
 * {@link org.springframework.core.Ordered Ordered} or marked with @{@link
 * org.springframework.core.annotation.Order Order} will be sorted appropriately.
 * @param sc the current servlet context
 * @param wac the newly created application context
 * @see #CONTEXT_INITIALIZER_CLASSES_PARAM
 * @see ApplicationContextInitializer#initialize(ConfigurableApplicationContext)
 */
protected void customizeContext(ServletContext sc, ConfigurableWebApplicationContext wac) {
	List<Class<ApplicationContextInitializer<ConfigurableApplicationContext>>> initializerClasses =
			determineContextInitializerClasses(sc);

	for (Class<ApplicationContextInitializer<ConfigurableApplicationContext>> initializerClass : initializerClasses) {
		Class<?> initializerContextClass =
				GenericTypeResolver.resolveTypeArgument(initializerClass, ApplicationContextInitializer.class);
		if (initializerContextClass != null) {
			Assert.isAssignable(initializerContextClass, wac.getClass(), String.format(
					"Could not add context initializer [%s] since its generic parameter [%s] " +
					"is not assignable from the type of application context used by this " +
					"context loader [%s]: ", initializerClass.getName(), initializerContextClass.getName(),
					wac.getClass().getName()));
		}
		this.contextInitializers.add(BeanUtils.instantiateClass(initializerClass));
	}

	AnnotationAwareOrderComparator.sort(this.contextInitializers);
	for (ApplicationContextInitializer<ConfigurableApplicationContext> initializer : this.contextInitializers) {
		initializer.initialize(wac);
	}
}
 
Example 5
Source File: ContextFunctionCatalogInitializerTests.java    From spring-cloud-function with Apache License 2.0 6 votes vote down vote up
private void create(ApplicationContextInitializer<GenericApplicationContext>[] types,
		String... props) {
	this.context = new GenericApplicationContext();
	Map<String, Object> map = new HashMap<>();
	for (String prop : props) {
		String[] array = StringUtils.delimitedListToStringArray(prop, "=");
		String key = array[0];
		String value = array.length > 1 ? array[1] : "";
		map.put(key, value);
	}
	if (!map.isEmpty()) {
		this.context.getEnvironment().getPropertySources()
				.addFirst(new MapPropertySource("testProperties", map));
	}
	for (ApplicationContextInitializer<GenericApplicationContext> type : types) {
		type.initialize(this.context);
	}
	new ContextFunctionCatalogInitializer.ContextFunctionCatalogBeanRegistrar(
			this.context).postProcessBeanDefinitionRegistry(this.context);
	this.context.refresh();
	this.catalog = this.context.getBean(FunctionCatalog.class);
	this.inspector = this.context.getBean(FunctionInspector.class);
}
 
Example 6
Source File: AbstractServletHandlerMethodTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
/**
 * Initialize a DispatcherServlet instance registering zero or more controller classes
 * and also providing additional bean definitions through a callback.
 */
@SuppressWarnings("serial")
protected WebApplicationContext initServlet(
		final ApplicationContextInitializer<GenericWebApplicationContext> initializer,
		final Class<?>... controllerClasses) throws ServletException {

	final GenericWebApplicationContext wac = new GenericWebApplicationContext();

	servlet = new DispatcherServlet() {
		@Override
		protected WebApplicationContext createWebApplicationContext(@Nullable WebApplicationContext parent) {
			for (Class<?> clazz : controllerClasses) {
				wac.registerBeanDefinition(clazz.getSimpleName(), new RootBeanDefinition(clazz));
			}

			RootBeanDefinition mappingDef = new RootBeanDefinition(RequestMappingHandlerMapping.class);
			mappingDef.getPropertyValues().add("removeSemicolonContent", "false");
			wac.registerBeanDefinition("handlerMapping", mappingDef);
			wac.registerBeanDefinition("handlerAdapter",
					new RootBeanDefinition(RequestMappingHandlerAdapter.class));
			wac.registerBeanDefinition("requestMappingResolver",
					new RootBeanDefinition(ExceptionHandlerExceptionResolver.class));
			wac.registerBeanDefinition("responseStatusResolver",
					new RootBeanDefinition(ResponseStatusExceptionResolver.class));
			wac.registerBeanDefinition("defaultResolver",
					new RootBeanDefinition(DefaultHandlerExceptionResolver.class));

			if (initializer != null) {
				initializer.initialize(wac);
			}

			wac.refresh();
			return wac;
		}
	};

	servlet.init(new MockServletConfig());

	return wac;
}
 
Example 7
Source File: AbstractContextLoader.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@SuppressWarnings("unchecked")
private void invokeApplicationContextInitializers(ConfigurableApplicationContext context,
		MergedContextConfiguration mergedConfig) {

	Set<Class<? extends ApplicationContextInitializer<?>>> initializerClasses =
			mergedConfig.getContextInitializerClasses();
	if (initializerClasses.isEmpty()) {
		// no ApplicationContextInitializers have been declared -> nothing to do
		return;
	}

	List<ApplicationContextInitializer<ConfigurableApplicationContext>> initializerInstances = new ArrayList<>();
	Class<?> contextClass = context.getClass();

	for (Class<? extends ApplicationContextInitializer<?>> initializerClass : initializerClasses) {
		Class<?> initializerContextClass =
				GenericTypeResolver.resolveTypeArgument(initializerClass, ApplicationContextInitializer.class);
		if (initializerContextClass != null && !initializerContextClass.isInstance(context)) {
			throw new ApplicationContextException(String.format(
					"Could not apply context initializer [%s] since its generic parameter [%s] " +
					"is not assignable from the type of application context used by this " +
					"context loader: [%s]", initializerClass.getName(), initializerContextClass.getName(),
					contextClass.getName()));
		}
		initializerInstances.add((ApplicationContextInitializer<ConfigurableApplicationContext>) BeanUtils.instantiateClass(initializerClass));
	}

	AnnotationAwareOrderComparator.sort(initializerInstances);
	for (ApplicationContextInitializer<ConfigurableApplicationContext> initializer : initializerInstances) {
		initializer.initialize(context);
	}
}
 
Example 8
Source File: AbstractServletHandlerMethodTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
/**
 * Initialize a DispatcherServlet instance registering zero or more controller classes
 * and also providing additional bean definitions through a callback.
 */
@SuppressWarnings("serial")
protected WebApplicationContext initServlet(
		final ApplicationContextInitializer<GenericWebApplicationContext> initializer,
		final Class<?>... controllerClasses) throws ServletException {

	final GenericWebApplicationContext wac = new GenericWebApplicationContext();

	servlet = new DispatcherServlet() {
		@Override
		protected WebApplicationContext createWebApplicationContext(@Nullable WebApplicationContext parent) {
			for (Class<?> clazz : controllerClasses) {
				wac.registerBeanDefinition(clazz.getSimpleName(), new RootBeanDefinition(clazz));
			}

			RootBeanDefinition mappingDef = new RootBeanDefinition(RequestMappingHandlerMapping.class);
			mappingDef.getPropertyValues().add("removeSemicolonContent", "false");
			wac.registerBeanDefinition("handlerMapping", mappingDef);
			wac.registerBeanDefinition("handlerAdapter",
					new RootBeanDefinition(RequestMappingHandlerAdapter.class));
			wac.registerBeanDefinition("requestMappingResolver",
					new RootBeanDefinition(ExceptionHandlerExceptionResolver.class));
			wac.registerBeanDefinition("responseStatusResolver",
					new RootBeanDefinition(ResponseStatusExceptionResolver.class));
			wac.registerBeanDefinition("defaultResolver",
					new RootBeanDefinition(DefaultHandlerExceptionResolver.class));

			if (initializer != null) {
				initializer.initialize(wac);
			}

			wac.refresh();
			return wac;
		}
	};

	servlet.init(new MockServletConfig());

	return wac;
}
 
Example 9
Source File: AbstractContextLoader.java    From java-technology-stack with MIT License 5 votes vote down vote up
@SuppressWarnings("unchecked")
private void invokeApplicationContextInitializers(ConfigurableApplicationContext context,
		MergedContextConfiguration mergedConfig) {

	Set<Class<? extends ApplicationContextInitializer<?>>> initializerClasses =
			mergedConfig.getContextInitializerClasses();
	if (initializerClasses.isEmpty()) {
		// no ApplicationContextInitializers have been declared -> nothing to do
		return;
	}

	List<ApplicationContextInitializer<ConfigurableApplicationContext>> initializerInstances = new ArrayList<>();
	Class<?> contextClass = context.getClass();

	for (Class<? extends ApplicationContextInitializer<?>> initializerClass : initializerClasses) {
		Class<?> initializerContextClass =
				GenericTypeResolver.resolveTypeArgument(initializerClass, ApplicationContextInitializer.class);
		if (initializerContextClass != null && !initializerContextClass.isInstance(context)) {
			throw new ApplicationContextException(String.format(
					"Could not apply context initializer [%s] since its generic parameter [%s] " +
					"is not assignable from the type of application context used by this " +
					"context loader: [%s]", initializerClass.getName(), initializerContextClass.getName(),
					contextClass.getName()));
		}
		initializerInstances.add((ApplicationContextInitializer<ConfigurableApplicationContext>) BeanUtils.instantiateClass(initializerClass));
	}

	AnnotationAwareOrderComparator.sort(initializerInstances);
	for (ApplicationContextInitializer<ConfigurableApplicationContext> initializer : initializerInstances) {
		initializer.initialize(context);
	}
}
 
Example 10
Source File: SpringApplication.java    From spring-javaformat with Apache License 2.0 5 votes vote down vote up
/**
 * Apply any {@link ApplicationContextInitializer}s to the context before it is
 * refreshed.
 * @param context the configured ApplicationContext (not refreshed yet)
 * @see ConfigurableApplicationContext#refresh()
 */
@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);
	}
}
 
Example 11
Source File: FunctionalInstallerListener.java    From spring-init with Apache License 2.0 5 votes vote down vote up
private void apply(GenericApplicationContext context) {
	List<ApplicationContextInitializer<GenericApplicationContext>> initializers = new ArrayList<>();
	for (ApplicationContextInitializer<GenericApplicationContext> result : this.initializers) {
		initializers.add(result);
	}
	OrderComparator.sort(initializers);
	if (logger.isDebugEnabled()) {
		logger.debug("Applying initializers: " + initializers);
	}
	for (ApplicationContextInitializer<GenericApplicationContext> initializer : initializers) {
		initializer.initialize(context);
	}
}
 
Example 12
Source File: AbstractContextLoader.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
private void invokeApplicationContextInitializers(ConfigurableApplicationContext context,
		MergedContextConfiguration mergedConfig) {
	Set<Class<? extends ApplicationContextInitializer<? extends ConfigurableApplicationContext>>> initializerClasses = mergedConfig.getContextInitializerClasses();
	if (initializerClasses.isEmpty()) {
		// no ApplicationContextInitializers have been declared -> nothing to do
		return;
	}

	List<ApplicationContextInitializer<ConfigurableApplicationContext>> initializerInstances = new ArrayList<ApplicationContextInitializer<ConfigurableApplicationContext>>();
	Class<?> contextClass = context.getClass();

	for (Class<? extends ApplicationContextInitializer<? extends ConfigurableApplicationContext>> initializerClass : initializerClasses) {
		Class<?> initializerContextClass = GenericTypeResolver.resolveTypeArgument(initializerClass,
			ApplicationContextInitializer.class);
		Assert.isAssignable(initializerContextClass, contextClass, String.format(
			"Could not add context initializer [%s] since its generic parameter [%s] "
					+ "is not assignable from the type of application context used by this "
					+ "context loader [%s]: ", initializerClass.getName(), initializerContextClass.getName(),
			contextClass.getName()));
		initializerInstances.add((ApplicationContextInitializer<ConfigurableApplicationContext>) BeanUtils.instantiateClass(initializerClass));
	}

	AnnotationAwareOrderComparator.sort(initializerInstances);
	for (ApplicationContextInitializer<ConfigurableApplicationContext> initializer : initializerInstances) {
		initializer.initialize(context);
	}
}
 
Example 13
Source File: MSF4JSpringApplication.java    From msf4j with Apache License 2.0 5 votes vote down vote up
private 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);
    }
}
 
Example 14
Source File: AbstractDsl.java    From spring-fu with Apache License 2.0 4 votes vote down vote up
/**
 * Override return type in inherited classes to return the concrete class type and make it public where you want
 * to make it available.
 */
protected AbstractDsl enable(ApplicationContextInitializer<GenericApplicationContext> dsl) {
	dsl.initialize(context);
	return this;
}
 
Example 15
Source File: AbstractServletHandlerMethodTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
/**
 * Initialize a DispatcherServlet instance registering zero or more controller classes
 * and also providing additional bean definitions through a callback.
 */
@SuppressWarnings("serial")
protected WebApplicationContext initServlet(
		final ApplicationContextInitializer<GenericWebApplicationContext> initializer,
		final Class<?>... controllerClasses) throws ServletException {

	final GenericWebApplicationContext wac = new GenericWebApplicationContext();

	servlet = new DispatcherServlet() {
		@Override
		protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
			for (Class<?> clazz : controllerClasses) {
				wac.registerBeanDefinition(clazz.getSimpleName(), new RootBeanDefinition(clazz));
			}

			Class<?> mappingType = RequestMappingHandlerMapping.class;
			RootBeanDefinition beanDef = new RootBeanDefinition(mappingType);
			beanDef.getPropertyValues().add("removeSemicolonContent", "false");
			wac.registerBeanDefinition("handlerMapping", beanDef);

			Class<?> adapterType = RequestMappingHandlerAdapter.class;
			wac.registerBeanDefinition("handlerAdapter", new RootBeanDefinition(adapterType));

			Class<?> resolverType = ExceptionHandlerExceptionResolver.class;
			wac.registerBeanDefinition("requestMappingResolver", new RootBeanDefinition(resolverType));

			resolverType = ResponseStatusExceptionResolver.class;
			wac.registerBeanDefinition("responseStatusResolver", new RootBeanDefinition(resolverType));

			resolverType = DefaultHandlerExceptionResolver.class;
			wac.registerBeanDefinition("defaultResolver", new RootBeanDefinition(resolverType));

			if (initializer != null) {
				initializer.initialize(wac);
			}

			wac.refresh();
			return wac;
		}
	};

	servlet.init(new MockServletConfig());

	return wac;
}
 
Example 16
Source File: FunctionalSpringApplication.java    From spring-cloud-function with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
protected void postProcessApplicationContext(ConfigurableApplicationContext context) {
	super.postProcessApplicationContext(context);
	boolean functional = false;
	Assert.isInstanceOf(GenericApplicationContext.class, context,
			"ApplicationContext must be an instanceof GenericApplicationContext");
	for (Object source : getAllSources()) {
		Class<?> type = null;
		Object handler = null;
		if (source instanceof String) {
			String name = (String) source;
			if (ClassUtils.isPresent(name, null)) {
				type = ClassUtils.resolveClassName(name, null);
			}
		}
		else if (source instanceof Class<?>) {
			type = (Class<?>) source;
		}
		else {
			type = source.getClass();
			handler = source;
		}
		if (ApplicationContextInitializer.class.isAssignableFrom(type)) {
			if (handler == null) {
				handler = BeanUtils.instantiateClass(type);
			}

			ApplicationContextInitializer<ConfigurableApplicationContext> initializer =
					(ApplicationContextInitializer<ConfigurableApplicationContext>) handler;
			initializer.initialize(context);
			functional = true;
		}
		else if (Function.class.isAssignableFrom(type)
				|| Consumer.class.isAssignableFrom(type)
				|| Supplier.class.isAssignableFrom(type)) {
			Class<?> functionType = type;
			Object function = handler;
			if (source.equals(functionType)) {
				context.addBeanFactoryPostProcessor(beanFactory -> {
					BeanDefinitionRegistry bdRegistry = (BeanDefinitionRegistry) beanFactory;
					if (!ObjectUtils.isEmpty(context.getBeanNamesForType(functionType))) {
						stream(context.getBeanNamesForType(functionType))
						.forEach(beanName -> bdRegistry.registerAlias(beanName, "function"));
					}
					else {
						this.register((GenericApplicationContext) context, function, functionType);
					}
				});
			}
			else {
				this.register((GenericApplicationContext) context, function, functionType);
			}
			functional = true;
		}
	}
	if (functional) {
		defaultProperties(context);
	}
}