Commit ef6139be authored by Phillip Webb's avatar Phillip Webb

Refactor from deprecated getAliasedStringArray

Update ServletComponentScanRegistrar to make use of Spring Framework's
updated alias support with ASM reading.

See gh-6337
parent 037e6974
...@@ -76,8 +76,7 @@ class ServletComponentScanRegistrar implements ImportBeanDefinitionRegistrar { ...@@ -76,8 +76,7 @@ class ServletComponentScanRegistrar implements ImportBeanDefinitionRegistrar {
private Set<String> getPackagesToScan(AnnotationMetadata metadata) { private Set<String> getPackagesToScan(AnnotationMetadata metadata) {
AnnotationAttributes attributes = AnnotationAttributes.fromMap( AnnotationAttributes attributes = AnnotationAttributes.fromMap(
metadata.getAnnotationAttributes(ServletComponentScan.class.getName())); metadata.getAnnotationAttributes(ServletComponentScan.class.getName()));
String[] basePackages = attributes.getAliasedStringArray("basePackages", String[] basePackages = attributes.getStringArray("basePackages");
ServletComponentScan.class, metadata.getClassName());
Class<?>[] basePackageClasses = attributes.getClassArray("basePackageClasses"); Class<?>[] basePackageClasses = attributes.getClassArray("basePackageClasses");
Set<String> packagesToScan = new LinkedHashSet<String>(); Set<String> packagesToScan = new LinkedHashSet<String>();
packagesToScan.addAll(Arrays.asList(basePackages)); packagesToScan.addAll(Arrays.asList(basePackages));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment