BeanDefinitions: Mix instanceSupplier and props

This commit is contained in:
Artem Bilan
2021-10-08 14:45:34 -04:00
parent 7d29cf7f02
commit ee8afc5b28
18 changed files with 349 additions and 564 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 the original author or authors.
* Copyright 2016-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,8 +56,9 @@ public class WsIntegrationConfigurationInitializer implements IntegrationConfigu
if (beanFactory instanceof BeanDefinitionRegistry) {
if (beanFactory.getBeanNamesForType(EndpointAdapter.class, false, false).length > 0) {
BeanDefinitionBuilder requestMappingBuilder =
BeanDefinitionBuilder.genericBeanDefinition(MessageEndpointAdapter.class);
requestMappingBuilder.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
BeanDefinitionBuilder.genericBeanDefinition(MessageEndpointAdapter.class,
MessageEndpointAdapter::new)
.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
((BeanDefinitionRegistry) beanFactory).registerBeanDefinition(MESSAGE_ENDPOINT_ADAPTER_BEAN_NAME,
requestMappingBuilder.getBeanDefinition());
}