mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
a68f5b1674
Implicit convention-based annotation attribute overrides have been supported for a long time; however, Spring Framework 4.2 introduced support for explicit annotation attribute overrides via @AliasFor. Since explicit overrides are favorable to implicit overrides, and since the support for convention-based overrides increases the complexity of Spring's annotation search algorithms, this commit deprecates convention-based overrides and logs a WARNING whey the are encountered. For example, the following message is logged for a test that still uses convention-based overrides. A log message is generated for each such attribute in a given annotation but only once per application run. WARN Support for convention-based annotation attribute overrides is deprecated and will be removed in Spring Framework 6.1. Please annotate the 'basePackages' attribute in @org.springframework.context.annotation.ConfigurationClassPostProcessorTests$ComposedConfigurationWithAttributeOverrides with an appropriate @AliasFor declaration. Closes gh-28760