I'm working on setting up a Spring "meta-annotation" similar to the SpringBootApplication Spring Boot provides. I've been able to setup ComponentScan and EnableAutoConfiguration annotations using this convention successfully, however I'm not able to pass the value attribute successfully on to ImportResource.
Here's a quick example of what I'd like to do:
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@ComponentScan(basePackages = {"com.my.package.example"})
@EnableAutoConfiguration
@ImportResource
public @interface MyMetaAnnotationExample {
String[] value() default {};
}
However, the compiler complains that no attribute is passed to ImportResource. When I try passing that attribute, I don't have the values I want passed through the MyMetaAnnotationExample so I'm not able to set these.
The ComponentScan works of course because that is something that is desired to hard-coded, but the ImportResource is something that is desired to pass the value in.