Skip to content

Commit b844f3e

Browse files
committed
Regular autowire for ControlBusControllerConfiguration
The `ControlBusController` cannot be created without a `FormattingConversionService`. Therefore, an `ObjectProvider.getObject()` is used. However, the regular bean method parameter injection does exactly the same with plain auto-wiring type
1 parent cc8bf94 commit b844f3e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spring-integration-http/src/main/java/org/springframework/integration/http/config/ControlBusControllerConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import org.apache.commons.logging.LogFactory;
2121
import org.jspecify.annotations.Nullable;
2222

23-
import org.springframework.beans.factory.ObjectProvider;
2423
import org.springframework.beans.factory.config.BeanDefinition;
2524
import org.springframework.context.annotation.Bean;
2625
import org.springframework.context.annotation.Configuration;
@@ -48,7 +47,7 @@ public class ControlBusControllerConfiguration {
4847
@Bean
4948
@Nullable
5049
ControlBusController controlBusController(ControlBusCommandRegistry controlBusCommandRegistry,
51-
ObjectProvider<FormattingConversionService> conversionService) {
50+
FormattingConversionService conversionService) {
5251

5352
if (!HttpContextUtils.WEB_MVC_PRESENT && !HttpContextUtils.WEB_FLUX_PRESENT) {
5453
LOGGER.warn("The 'IntegrationGraphController' isn't registered with the application context because" +
@@ -58,7 +57,7 @@ ControlBusController controlBusController(ControlBusCommandRegistry controlBusCo
5857

5958
controlBusCommandRegistry.setEagerInitialization(true);
6059

61-
return new ControlBusController(controlBusCommandRegistry, conversionService.getObject());
60+
return new ControlBusController(controlBusCommandRegistry, conversionService);
6261
}
6362

6463
}

0 commit comments

Comments
 (0)