New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pseudo-meta-annotation for @ImportAutoConfiguration #16881
Comments
That might have some interesting knock on effects with regular auto-configuration since presumably only What's driving the desire for such a change? |
I don't know about the knock on effects exactly. The The driver is experimenting with grouping autoconfig classes together in curated sets, implemented simply as classes annotated with |
Actually, on reflection, I got this wrong. I can always use @ImportAutoConfiguration(Bar.class)
@SpringBootConfiguration(proxyBeanMethods = false)
@ComponentScan
@AutoConfigurationPackage
@Import(Foo.class)
public class MyApplication { ... } but this doesn't @ImportAutoConfiguration(Bar.class)
@MySpringBootApplication(Foo.class)
public class MyApplication { ... } with @Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@SpringBootConfiguration(proxyBeanMethods = false)
@ComponentScan
@Import({})
@AutoConfigurationPackage
public @interface MySpringBootApplication {
@AliasFor(annotation = Import.class)
Class<?>[] value() default {};
} If I can understand that, it might need a tweak in Boot, or it might be something I can fix in my code. |
It looks to me like Spring Framework doesn't currently support |
@dsyer Are you still interested in this one? |
Still interested yes. Not actively working on anything that needs it though, so not urgent. I would probably do more work if this feature became available somehow. |
It would be nice to be able to
@ImportAutoConfiguration(Foo.class)
whereFoo
is itself annotated with@ImportAutoConfiguration(Bar.class)
and forBar
to end up in the list of autoconfigs to be sorted and applied. It's almost a meta-annotation, but actually requires (I think) some conscious link following.The text was updated successfully, but these errors were encountered: