From ef6139be63423cd7a0cfe8ebdc7ad171fa2bd534 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 18 Jul 2016 11:26:57 -0700 Subject: [PATCH] Refactor from deprecated getAliasedStringArray Update ServletComponentScanRegistrar to make use of Spring Framework's updated alias support with ASM reading. See gh-6337 --- .../boot/web/servlet/ServletComponentScanRegistrar.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletComponentScanRegistrar.java b/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletComponentScanRegistrar.java index 78efa6d9a8..f3c6b98ac7 100644 --- a/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletComponentScanRegistrar.java +++ b/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletComponentScanRegistrar.java @@ -76,8 +76,7 @@ class ServletComponentScanRegistrar implements ImportBeanDefinitionRegistrar { private Set 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 packagesToScan = new LinkedHashSet(); packagesToScan.addAll(Arrays.asList(basePackages));