Closed
Description
Dave Syer opened SPR-10181 and commented
Allow meta-annotations to override attributes from their parent. Example: Spring Batch 2.2 defines
@Scope(value = "step", proxyMode = INTERFACES)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface StepScope {
}
But if the user needs to have proxyMode = TARGET_CLASS
(which is quite common) he has to define his own meta-annotation, or use @Scope
. It would be nice if we could do this:
@Scope(value = "step")
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface StepScope {
ScopedProxyMode proxyMode() default ScopedProxyMode.INTERFACES;
}
and have the default value picked up as well as any explicit overrides by users of the new annotation.
Issue Links:
- Support meta-annotation attribute overrides in the TestContext framework [SPR-11038] #15666 Support meta-annotation attribute overrides in the TestContext framework ("is depended on by")
- Support composed annotations declared on interfaces [SPR-11108] #15734 Support composed annotations declared on interfaces
- Introduce aliases for 'value' annotation attributes [SPR-11393] #16020 Introduce aliases for 'value' annotation attributes
Referenced from: commits f2fb0ec, 6d36498
1 votes, 4 watchers