Skip to content

Commit 3fad7cd

Browse files
authored
Reduce instance supplier use to appease AOT
* Remove the use of instance suppliers on bean definitions that are processed during the AOT phase. * The remaining areas that use instance suppliers do so at runtime and do not use reflection, but instead are passed the configured bean to register. See spring-cloud/spring-cloud-stream#2655 **Cherry-pick to `6.0.x`**
1 parent dfe45c7 commit 3fad7cd

File tree

17 files changed

+82
-110
lines changed

17 files changed

+82
-110
lines changed

spring-integration-core/src/main/java/org/springframework/integration/config/DefaultConfiguringBeanFactoryPostProcessor.java

+21-36
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -70,6 +70,7 @@
7070
* @author Gary Russell
7171
* @author Michael Wiles
7272
* @author Pierre Lakreb
73+
* @author Chris Bono
7374
*
7475
* @see IntegrationContextUtils
7576
*/
@@ -153,14 +154,14 @@ public void afterSingletonsInstantiated() {
153154
private void registerBeanFactoryChannelResolver() {
154155
if (!this.beanFactory.containsBeanDefinition(ChannelResolverUtils.CHANNEL_RESOLVER_BEAN_NAME)) {
155156
this.registry.registerBeanDefinition(ChannelResolverUtils.CHANNEL_RESOLVER_BEAN_NAME,
156-
new RootBeanDefinition(BeanFactoryChannelResolver.class, BeanFactoryChannelResolver::new));
157+
new RootBeanDefinition(BeanFactoryChannelResolver.class));
157158
}
158159
}
159160

160161
private void registerMessagePublishingErrorHandler() {
161162
if (!this.beanFactory.containsBeanDefinition(ChannelUtils.MESSAGE_PUBLISHING_ERROR_HANDLER_BEAN_NAME)) {
162163
this.registry.registerBeanDefinition(ChannelUtils.MESSAGE_PUBLISHING_ERROR_HANDLER_BEAN_NAME,
163-
new RootBeanDefinition(MessagePublishingErrorHandler.class, MessagePublishingErrorHandler::new));
164+
new RootBeanDefinition(MessagePublishingErrorHandler.class));
164165
}
165166
}
166167

@@ -173,8 +174,7 @@ private void registerNullChannel() {
173174
BeanDefinition nullChannelDefinition = null;
174175
BeanFactory beanFactoryToUse = this.beanFactory;
175176
do {
176-
if (beanFactoryToUse instanceof ConfigurableListableBeanFactory) {
177-
ConfigurableListableBeanFactory listable = (ConfigurableListableBeanFactory) beanFactoryToUse;
177+
if (beanFactoryToUse instanceof ConfigurableListableBeanFactory listable) {
178178
if (listable.containsBeanDefinition(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME)) {
179179
nullChannelDefinition =
180180
listable.getBeanDefinition(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME);
@@ -193,7 +193,7 @@ private void registerNullChannel() {
193193
}
194194
else {
195195
this.registry.registerBeanDefinition(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME,
196-
new RootBeanDefinition(NullChannel.class, NullChannel::new));
196+
new RootBeanDefinition(NullChannel.class));
197197
}
198198
}
199199

@@ -208,9 +208,8 @@ private void registerErrorChannel() {
208208
LOGGER.info(() -> "No bean named '" + IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME +
209209
"' has been explicitly defined. " +
210210
"Therefore, a default PublishSubscribeChannel will be created.");
211-
212211
this.registry.registerBeanDefinition(IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME,
213-
BeanDefinitionBuilder.rootBeanDefinition(PublishSubscribeChannel.class, this::createErrorChannel)
212+
BeanDefinitionBuilder.rootBeanDefinition(PublishSubscribeChannel.class)
214213
.addConstructorArgValue(IntegrationProperties.getExpressionFor(
215214
IntegrationProperties.ERROR_CHANNEL_REQUIRE_SUBSCRIBERS))
216215
.addPropertyValue("ignoreFailures", IntegrationProperties.getExpressionFor(
@@ -220,15 +219,13 @@ private void registerErrorChannel() {
220219
String errorLoggerBeanName =
221220
IntegrationContextUtils.ERROR_LOGGER_BEAN_NAME + IntegrationConfigUtils.HANDLER_ALIAS_SUFFIX;
222221
this.registry.registerBeanDefinition(errorLoggerBeanName,
223-
BeanDefinitionBuilder.genericBeanDefinition(LoggingHandler.class,
224-
() -> new LoggingHandler(LoggingHandler.Level.ERROR))
222+
BeanDefinitionBuilder.genericBeanDefinition(LoggingHandler.class)
225223
.addConstructorArgValue(LoggingHandler.Level.ERROR)
226224
.addPropertyValue(IntegrationNamespaceUtils.ORDER, Ordered.LOWEST_PRECEDENCE - 100)
227225
.getBeanDefinition());
228226

229227
BeanDefinitionBuilder loggingEndpointBuilder =
230-
BeanDefinitionBuilder.genericBeanDefinition(ConsumerEndpointFactoryBean.class,
231-
ConsumerEndpointFactoryBean::new)
228+
BeanDefinitionBuilder.genericBeanDefinition(ConsumerEndpointFactoryBean.class)
232229
.addPropertyValue("inputChannelName", IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME)
233230
.addPropertyReference("handler", errorLoggerBeanName);
234231

@@ -239,20 +236,14 @@ private void registerErrorChannel() {
239236
}
240237
}
241238

242-
private PublishSubscribeChannel createErrorChannel() {
243-
IntegrationProperties integrationProperties = IntegrationContextUtils.getIntegrationProperties(this.beanFactory);
244-
return new PublishSubscribeChannel(integrationProperties.isErrorChannelRequireSubscribers());
245-
}
246-
247239
/**
248240
* Register {@link IntegrationEvaluationContextFactoryBean}
249241
* and {@link IntegrationSimpleEvaluationContextFactoryBean} beans, if necessary.
250242
*/
251243
private void registerIntegrationEvaluationContext() {
252244
if (!this.registry.containsBeanDefinition(IntegrationContextUtils.INTEGRATION_EVALUATION_CONTEXT_BEAN_NAME)) {
253245
BeanDefinitionBuilder integrationEvaluationContextBuilder =
254-
BeanDefinitionBuilder.genericBeanDefinition(IntegrationEvaluationContextFactoryBean.class,
255-
IntegrationEvaluationContextFactoryBean::new)
246+
BeanDefinitionBuilder.genericBeanDefinition(IntegrationEvaluationContextFactoryBean.class)
256247
.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
257248

258249
this.registry.registerBeanDefinition(IntegrationContextUtils.INTEGRATION_EVALUATION_CONTEXT_BEAN_NAME,
@@ -263,8 +254,7 @@ private void registerIntegrationEvaluationContext() {
263254
IntegrationContextUtils.INTEGRATION_SIMPLE_EVALUATION_CONTEXT_BEAN_NAME)) {
264255

265256
BeanDefinitionBuilder integrationEvaluationContextBuilder =
266-
BeanDefinitionBuilder.genericBeanDefinition(IntegrationSimpleEvaluationContextFactoryBean.class,
267-
IntegrationSimpleEvaluationContextFactoryBean::new)
257+
BeanDefinitionBuilder.genericBeanDefinition(IntegrationSimpleEvaluationContextFactoryBean.class)
268258
.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
269259

270260
this.registry.registerBeanDefinition(IntegrationContextUtils.INTEGRATION_SIMPLE_EVALUATION_CONTEXT_BEAN_NAME,
@@ -286,7 +276,7 @@ private void registerIdGeneratorConfigurer() {
286276
return;
287277
}
288278
}
289-
RootBeanDefinition beanDefinition = new RootBeanDefinition(clazz, IdGeneratorConfigurer::new);
279+
RootBeanDefinition beanDefinition = new RootBeanDefinition(clazz);
290280
beanDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
291281
BeanDefinitionReaderUtils.registerWithGeneratedName(beanDefinition, this.registry);
292282
}
@@ -300,8 +290,7 @@ private void registerTaskScheduler() {
300290
"' has been explicitly defined. " +
301291
"Therefore, a default ThreadPoolTaskScheduler will be created.");
302292
BeanDefinition scheduler =
303-
BeanDefinitionBuilder.genericBeanDefinition(ThreadPoolTaskScheduler.class,
304-
ThreadPoolTaskScheduler::new)
293+
BeanDefinitionBuilder.genericBeanDefinition(ThreadPoolTaskScheduler.class)
305294
.addPropertyValue("poolSize", IntegrationProperties.getExpressionFor(
306295
IntegrationProperties.TASK_SCHEDULER_POOL_SIZE))
307296
.addPropertyValue("threadNamePrefix", "task-scheduler-")
@@ -319,7 +308,7 @@ private void registerTaskScheduler() {
319308
private void registerIntegrationProperties() {
320309
if (!this.beanFactory.containsBean(IntegrationContextUtils.INTEGRATION_GLOBAL_PROPERTIES_BEAN_NAME)) {
321310
BeanDefinition userProperties =
322-
BeanDefinitionBuilder.genericBeanDefinition(PropertiesFactoryBean.class, PropertiesFactoryBean::new)
311+
BeanDefinitionBuilder.genericBeanDefinition(PropertiesFactoryBean.class)
323312
.addPropertyValue("locations", "classpath*:META-INF/spring.integration.properties")
324313
.getBeanDefinition();
325314

@@ -374,7 +363,7 @@ private void xpath(int registryId) throws LinkageError {
374363
private void registerRoleController() {
375364
if (!this.beanFactory.containsBean(IntegrationContextUtils.INTEGRATION_LIFECYCLE_ROLE_CONTROLLER)) {
376365
this.registry.registerBeanDefinition(IntegrationContextUtils.INTEGRATION_LIFECYCLE_ROLE_CONTROLLER,
377-
new RootBeanDefinition(SmartLifecycleRoleController.class, SmartLifecycleRoleController::new));
366+
new RootBeanDefinition(SmartLifecycleRoleController.class));
378367
}
379368
}
380369

@@ -384,7 +373,7 @@ private void registerRoleController() {
384373
private void registerMessageBuilderFactory() {
385374
if (!this.beanFactory.containsBean(IntegrationUtils.INTEGRATION_MESSAGE_BUILDER_FACTORY_BEAN_NAME)) {
386375
BeanDefinitionBuilder mbfBuilder = BeanDefinitionBuilder
387-
.genericBeanDefinition(DefaultMessageBuilderFactory.class, DefaultMessageBuilderFactory::new)
376+
.genericBeanDefinition(DefaultMessageBuilderFactory.class)
388377
.addPropertyValue("readOnlyHeaders",
389378
IntegrationProperties.getExpressionFor(IntegrationProperties.READ_ONLY_HEADERS));
390379
this.registry.registerBeanDefinition(
@@ -401,7 +390,7 @@ private void registerHeaderChannelRegistry() {
401390
"' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.");
402391

403392
this.registry.registerBeanDefinition(IntegrationContextUtils.INTEGRATION_HEADER_CHANNEL_REGISTRY_BEAN_NAME,
404-
new RootBeanDefinition(DefaultHeaderChannelRegistry.class, DefaultHeaderChannelRegistry::new));
393+
new RootBeanDefinition(DefaultHeaderChannelRegistry.class));
405394
}
406395
}
407396

@@ -412,8 +401,7 @@ private void registerGlobalChannelInterceptorProcessor() {
412401
if (!this.registry.containsBeanDefinition(
413402
IntegrationContextUtils.GLOBAL_CHANNEL_INTERCEPTOR_PROCESSOR_BEAN_NAME)) {
414403
BeanDefinitionBuilder builder =
415-
BeanDefinitionBuilder.genericBeanDefinition(GlobalChannelInterceptorProcessor.class,
416-
GlobalChannelInterceptorProcessor::new)
404+
BeanDefinitionBuilder.genericBeanDefinition(GlobalChannelInterceptorProcessor.class)
417405
.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
418406

419407
this.registry.registerBeanDefinition(IntegrationContextUtils.GLOBAL_CHANNEL_INTERCEPTOR_PROCESSOR_BEAN_NAME,
@@ -430,8 +418,7 @@ private void registerDefaultDatatypeChannelMessageConverter() {
430418

431419
this.registry.registerBeanDefinition(
432420
IntegrationContextUtils.INTEGRATION_DATATYPE_CHANNEL_MESSAGE_CONVERTER_BEAN_NAME,
433-
new RootBeanDefinition(DefaultDatatypeChannelMessageConverter.class,
434-
DefaultDatatypeChannelMessageConverter::new));
421+
new RootBeanDefinition(DefaultDatatypeChannelMessageConverter.class));
435422
}
436423
}
437424

@@ -442,8 +429,7 @@ private void registerDefaultDatatypeChannelMessageConverter() {
442429
private void registerArgumentResolverMessageConverter() {
443430
if (!this.beanFactory.containsBean(IntegrationContextUtils.ARGUMENT_RESOLVER_MESSAGE_CONVERTER_BEAN_NAME)) {
444431
this.registry.registerBeanDefinition(IntegrationContextUtils.ARGUMENT_RESOLVER_MESSAGE_CONVERTER_BEAN_NAME,
445-
new RootBeanDefinition(ConfigurableCompositeMessageConverter.class,
446-
ConfigurableCompositeMessageConverter::new));
432+
new RootBeanDefinition(ConfigurableCompositeMessageConverter.class));
447433
}
448434
}
449435

@@ -466,8 +452,7 @@ private void registerListMessageHandlerMethodFactory() {
466452
}
467453

468454
private static BeanDefinitionBuilder createMessageHandlerMethodFactoryBeanDefinition(boolean listCapable) {
469-
return BeanDefinitionBuilder.genericBeanDefinition(IntegrationMessageHandlerMethodFactory.class,
470-
() -> new IntegrationMessageHandlerMethodFactory(listCapable))
455+
return BeanDefinitionBuilder.genericBeanDefinition(IntegrationMessageHandlerMethodFactory.class)
471456
.addConstructorArgValue(listCapable)
472457
.addPropertyReference("messageConverter",
473458
IntegrationContextUtils.ARGUMENT_RESOLVER_MESSAGE_CONVERTER_BEAN_NAME);

spring-integration-core/src/main/java/org/springframework/integration/config/IdempotentReceiverAutoProxyCreatorInitializer.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2022 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -45,6 +45,7 @@
4545
* to Consumer Endpoints are present.
4646
*
4747
* @author Artem Bilan
48+
* @author Chris Bono
4849
*
4950
* @since 4.1
5051
*/
@@ -83,8 +84,7 @@ else if (beanDefinition instanceof AnnotatedBeanDefinition) {
8384

8485
if (!idempotentEndpointsMapping.isEmpty()) {
8586
BeanDefinition bd =
86-
BeanDefinitionBuilder.rootBeanDefinition(IdempotentReceiverAutoProxyCreator.class,
87-
IdempotentReceiverAutoProxyCreator::new)
87+
BeanDefinitionBuilder.rootBeanDefinition(IdempotentReceiverAutoProxyCreator.class)
8888
.addPropertyValue("idempotentEndpointsMapping", idempotentEndpointsMapping)
8989
.getBeanDefinition();
9090
registry.registerBeanDefinition(IDEMPOTENT_RECEIVER_AUTO_PROXY_CREATOR_BEAN_NAME, bd);

spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationComponentScanRegistrar.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2022 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -65,6 +65,7 @@
6565
*
6666
* @author Artem Bilan
6767
* @author Gary Russell
68+
* @author Chris Bono
6869
*
6970
* @since 4.0
7071
*/
@@ -109,7 +110,7 @@ public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, B
109110
}
110111

111112
registry.registerBeanDefinition(BEAN_NAME,
112-
BeanDefinitionBuilder.genericBeanDefinition(IntegrationComponentScanRegistrar.class, () -> this)
113+
BeanDefinitionBuilder.genericBeanDefinition(IntegrationComponentScanRegistrar.class)
113114
.setRole(BeanDefinition.ROLE_INFRASTRUCTURE)
114115
.getBeanDefinition());
115116

spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationConfigUtils.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2022 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,6 +29,7 @@
2929
* Shared utility methods for Integration configuration.
3030
*
3131
* @author Artem Bilan
32+
* @author Chris Bono
3233
*
3334
* @since 4.0
3435
*/
@@ -57,15 +58,14 @@ public static void registerSpelFunctionBean(BeanDefinitionRegistry registry, Str
5758
String methodSignature) {
5859

5960
BeanDefinitionBuilder builder =
60-
BeanDefinitionBuilder.genericBeanDefinition(SpelFunctionFactoryBean.class,
61-
() -> new SpelFunctionFactoryBean(aClass, methodSignature))
61+
BeanDefinitionBuilder.genericBeanDefinition(SpelFunctionFactoryBean.class)
6262
.addConstructorArgValue(aClass)
6363
.addConstructorArgValue(methodSignature);
6464
registry.registerBeanDefinition(functionId, builder.getBeanDefinition());
6565
}
6666

6767
public static void autoCreateDirectChannel(String channelName, BeanDefinitionRegistry registry) {
68-
registry.registerBeanDefinition(channelName, new RootBeanDefinition(DirectChannel.class, DirectChannel::new));
68+
registry.registerBeanDefinition(channelName, new RootBeanDefinition(DirectChannel.class));
6969
}
7070

7171
public static BeanNameGenerator annotationBeanNameGenerator(BeanDefinitionRegistry registry) {

spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationConverterInitializer.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2022 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,6 +38,7 @@
3838
*
3939
* @author Artem Bilan
4040
* @author Gary Russell
41+
* @author Chris Bono
4142
*
4243
* @since 4.0
4344
*/
@@ -60,13 +61,12 @@ public void initialize(ConfigurableListableBeanFactory beanFactory) throws Beans
6061

6162
if (!registry.containsBeanDefinition(IntegrationContextUtils.CONVERTER_REGISTRAR_BEAN_NAME)) {
6263
registry.registerBeanDefinition(IntegrationContextUtils.CONVERTER_REGISTRAR_BEAN_NAME,
63-
new RootBeanDefinition(ConverterRegistrar.class, ConverterRegistrar::new));
64+
new RootBeanDefinition(ConverterRegistrar.class));
6465
}
6566

6667
if (!registry.containsBeanDefinition(IntegrationUtils.INTEGRATION_CONVERSION_SERVICE_BEAN_NAME)) {
6768
registry.registerBeanDefinition(IntegrationUtils.INTEGRATION_CONVERSION_SERVICE_BEAN_NAME,
68-
new RootBeanDefinition(CustomConversionServiceFactoryBean.class,
69-
CustomConversionServiceFactoryBean::new));
69+
new RootBeanDefinition(CustomConversionServiceFactoryBean.class));
7070
}
7171

7272
}

spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationRegistrar.java

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2022 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@
3131
*
3232
* @author Artem Bilan
3333
* @author Gary Russell
34+
* @author Chris Bono
3435
*
3536
* @since 4.0
3637
*/
@@ -73,8 +74,7 @@ public void registerBeanDefinitions(@Nullable AnnotationMetadata importingClassM
7374
private void registerDefaultConfiguringBeanFactoryPostProcessor(BeanDefinitionRegistry registry) {
7475
if (!registry.containsBeanDefinition(IntegrationContextUtils.DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME)) {
7576
BeanDefinitionBuilder postProcessorBuilder =
76-
BeanDefinitionBuilder.genericBeanDefinition(DefaultConfiguringBeanFactoryPostProcessor.class,
77-
DefaultConfiguringBeanFactoryPostProcessor::new)
77+
BeanDefinitionBuilder.genericBeanDefinition(DefaultConfiguringBeanFactoryPostProcessor.class)
7878
.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
7979
registry.registerBeanDefinition(IntegrationContextUtils.DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME,
8080
postProcessorBuilder.getBeanDefinition());
@@ -90,8 +90,7 @@ private void registerIntegrationConfigurationBeanFactoryPostProcessor(BeanDefini
9090
IntegrationContextUtils.INTEGRATION_CONFIGURATION_POST_PROCESSOR_BEAN_NAME)) {
9191

9292
BeanDefinitionBuilder postProcessorBuilder =
93-
BeanDefinitionBuilder.genericBeanDefinition(IntegrationConfigurationBeanFactoryPostProcessor.class,
94-
IntegrationConfigurationBeanFactoryPostProcessor::new)
93+
BeanDefinitionBuilder.genericBeanDefinition(IntegrationConfigurationBeanFactoryPostProcessor.class)
9594
.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
9695
registry.registerBeanDefinition(IntegrationContextUtils.INTEGRATION_CONFIGURATION_POST_PROCESSOR_BEAN_NAME,
9796
postProcessorBuilder.getBeanDefinition());
@@ -108,8 +107,7 @@ private void registerIntegrationConfigurationBeanFactoryPostProcessor(BeanDefini
108107
private void registerMessagingAnnotationPostProcessors(BeanDefinitionRegistry registry) {
109108
if (!registry.containsBeanDefinition(IntegrationContextUtils.MESSAGING_ANNOTATION_POSTPROCESSOR_NAME)) {
110109
BeanDefinitionBuilder builder =
111-
BeanDefinitionBuilder.genericBeanDefinition(MessagingAnnotationPostProcessor.class,
112-
MessagingAnnotationPostProcessor::new)
110+
BeanDefinitionBuilder.genericBeanDefinition(MessagingAnnotationPostProcessor.class)
113111
.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
114112

115113
registry.registerBeanDefinition(IntegrationContextUtils.MESSAGING_ANNOTATION_POSTPROCESSOR_NAME,

spring-integration-core/src/main/java/org/springframework/integration/config/MessageHistoryRegistrar.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,6 +35,7 @@
3535
*
3636
* @author Artem Bilan
3737
* @author Gary Russell
38+
* @author Chris Bono
3839
*
3940
* @since 4.0
4041
*/
@@ -61,8 +62,7 @@ public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, B
6162
}
6263

6364
BeanDefinition messageHistoryConfigurer =
64-
BeanDefinitionBuilder.genericBeanDefinition(MessageHistoryConfigurer.class,
65-
MessageHistoryConfigurer::new)
65+
BeanDefinitionBuilder.genericBeanDefinition(MessageHistoryConfigurer.class)
6666
.addPropertyValue("componentNamePatterns", patterns)
6767
.getBeanDefinition();
6868

0 commit comments

Comments
 (0)