springtestdbunit / spring-test-dbunit

Integration between the Spring testing framework and DBUnit
http://springtestdbunit.github.com/spring-test-dbunit/
Apache License 2.0
476 stars 238 forks source link

Add Meta-Annotation support #128

Closed jhyot closed 11 months ago

jhyot commented 7 years ago

Modern Spring code heavily uses and promotes the use of meta-annotations (see http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-meta-annotations).

To be able to write idiomatic Sprint testing code, Spring DBUnit should support meta-annotations for its own annotations.

This pull request adds support for @DbUnitConfiguration as a meta-annotation. This should be the annotation that people would want to use most frequently as a meta-annotation. Support for the other annotations can be added later as well.

This change is fully backwards-compatible with existing code, since it only changes Annotation searching of @DbUnitConfiguration from present on a class to present and meta-present on the class (see Spring AnnotationUtils Javadocs for definition of the terms).