GH-2988: Use @Config(proxyBeanMethods=false) (#2989)
* GH-2988: Use `@Config(proxyBeanMethods=false)` Fixes https://github.com/spring-projects/spring-integration/issues/2988 For faster startup (and possibility to compile to native code with GraalVM) use a `proxyBeanMethods = false` on all the `@Configuration` classes in the Framework * Provide some other code style polishing * * Fix Checkstyle violation
This commit is contained in:
committed by
Gary Russell
parent
989d31716d
commit
084aaf7e57
@@ -44,7 +44,7 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* @since 4.2
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class IntegrationManagementConfiguration implements ImportAware, EnvironmentAware {
|
||||
|
||||
private AnnotationAttributes attributes;
|
||||
@@ -60,7 +60,7 @@ public class IntegrationManagementConfiguration implements ImportAware, Environm
|
||||
public void setImportMetadata(AnnotationMetadata importMetadata) {
|
||||
Map<String, Object> map = importMetadata.getAnnotationAttributes(EnableIntegrationManagement.class.getName());
|
||||
this.attributes = AnnotationAttributes.fromMap(map);
|
||||
Assert.notNull(this.attributes,
|
||||
Assert.notNull(this.attributes, () ->
|
||||
"@EnableIntegrationManagement is not present on importing class " + importMetadata.getClassName());
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class IntegrationManagementConfiguration implements ImportAware, Environm
|
||||
}
|
||||
|
||||
private void setupCountsEnabledNamePatterns(IntegrationManagementConfigurer configurer) {
|
||||
List<String> patterns = new ArrayList<String>();
|
||||
List<String> patterns = new ArrayList<>();
|
||||
String[] countsEnabled = this.attributes.getStringArray("countsEnabled");
|
||||
for (String managedComponent : countsEnabled) {
|
||||
String pattern = this.environment.resolvePlaceholders(managedComponent);
|
||||
|
||||
Reference in New Issue
Block a user