• Andy Wilkinson's avatar
    Consider meta-annotations when creating an AnnotationsPropertySource · 34b69156
    Andy Wilkinson authored
    Previously, meta-annotations were not considered when looking for
    annotations that may have property mappings but were considered when
    looking for a `@PropertyMapping` annotation. This led to three
    problems:
    
    1. Properties that should have been included in the property source
       were not included
    2. Properties that were included may have had the wrong name
    3. Properties were included when they should not have been
    
    `@DataJpaTests` provided a concrete example of all three problems:
    
    1. The `replace` and `connection` attributes from
       `@AutoConfigureTestDatabase` were not included in the property
       source
    2. The `showSql` attribute from `@DataJpaTest` was mapped as
       `spring.test.database.spring.jpa.show-sql`
    3. The `useDefaultFilters` attribute from `@DataJpaTest` was included
       in the property source.
    
    This commit updates AnnotationsPropertySource to consider
    meta-annotations when looking for attributes that should be mapped.
    This addresses the first problem. Furthermore,
    AnnotationsPropertySource has been updated to no longer consider
    meta-annotations when looking for a type-level property mapping.
    This addresses the second and third problems.
    
    Closes gh-5794
    34b69156
Name
Last commit
Last update
.github Loading commit data...
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-test Loading commit data...
spring-boot-test-autoconfigure Loading commit data...
spring-boot-tools Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...