About the current javadoc for the SqlConfig annotation there is no an indication about what happens if the annotation is annotated twice, it in a class level and method level.
So would be nice indicate if exists an overriding of the method over the class or a simply a merge of both.
Thanks for your understanding.
Comment From: sbrannen
there is no an indication about what happens if the annotation is annotated twice, it in a class level and method level.
For the record, @SqlConfig cannot be declared on a method since it only declares @Target(TYPE).
However, it can be declared within an @Sql annotation at the method level.
So would be nice indicate if exists an overriding of the method over the class or a simply a merge of both.
The documentation already explicitly states the semantics in the Configuration Scope paragraph:
When declared as a class-level annotation on an integration test class,
@SqlConfigserves as global configuration for all SQL scripts within the test class hierarchy. When declared directly via theconfigattribute of the@Sqlannotation,@SqlConfigserves as local configuration for the SQL scripts declared within the enclosing@Sqlannotation.
The Inheritance and Overrides paragraph goes on to explain:
Global
@SqlConfigattributes are inherited whenever local@SqlConfigattributes do not supply an explicit value other than"",{}, orDEFAULT. Explicit local configuration therefore overrides global configuration.
In light of that, I am closing this issue.