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 https://github.com/spring-cloud/spring-cloud-stream/issues/2655 **Cherry-pick to `6.0.x`**
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2021 the original author or authors.
|
||||
* Copyright 2014-2023 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.
|
||||
@@ -28,6 +28,7 @@ import org.springframework.integration.monitor.IntegrationMBeanExporter;
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
* @author Chris Bono
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@@ -45,7 +46,7 @@ public class JmxIntegrationConfigurationInitializer implements IntegrationConfig
|
||||
&& beanFactory.getBeanNamesForType(IntegrationMBeanExporter.class, false, false).length > 0) {
|
||||
|
||||
((BeanDefinitionRegistry) beanFactory).registerBeanDefinition(MBEAN_EXPORTER_HELPER_BEAN_NAME,
|
||||
new RootBeanDefinition(MBeanExporterHelper.class, MBeanExporterHelper::new));
|
||||
new RootBeanDefinition(MBeanExporterHelper.class));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user