Refactor from deprecated getAliasedStringArray

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

See gh-6337
pull/6414/head
Phillip Webb 8 years ago
parent 037e697406
commit ef6139be63

@ -76,8 +76,7 @@ class ServletComponentScanRegistrar implements ImportBeanDefinitionRegistrar {
private Set<String> getPackagesToScan(AnnotationMetadata metadata) {
AnnotationAttributes attributes = AnnotationAttributes.fromMap(
metadata.getAnnotationAttributes(ServletComponentScan.class.getName()));
String[] basePackages = attributes.getAliasedStringArray("basePackages",
ServletComponentScan.class, metadata.getClassName());
String[] basePackages = attributes.getStringArray("basePackages");
Class<?>[] basePackageClasses = attributes.getClassArray("basePackageClasses");
Set<String> packagesToScan = new LinkedHashSet<String>();
packagesToScan.addAll(Arrays.asList(basePackages));

Loading…
Cancel
Save