Limit supported annotations to @ConfigurationProperties and @Configuration
Previously, the configuration property annotation processor declared that it supported all annotation types. This hurt performance and prevented incremental builds with Gradle when compiling source code containing source-retention annotations. This commit updates its supported annotation types to be only `@ConfigurationProperties` and `@Configuration`. The latter is declared to allow binding third-party classes returned from a `@Bean` method. Fixes gh-23580
This commit is contained in:
@@ -59,7 +59,8 @@ import org.springframework.boot.configurationprocessor.metadata.ItemMetadata;
|
||||
* @author Jonas Keßler
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@SupportedAnnotationTypes({ "*" })
|
||||
@SupportedAnnotationTypes({ ConfigurationMetadataAnnotationProcessor.CONFIGURATION_PROPERTIES_ANNOTATION,
|
||||
"org.springframework.context.annotation.Configuration" })
|
||||
public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor {
|
||||
|
||||
static final String ADDITIONAL_METADATA_LOCATIONS_OPTION = "org.springframework.boot.configurationprocessor.additionalMetadataLocations";
|
||||
|
||||
Reference in New Issue
Block a user