Given a class:
class MyConfiguration {
@Bean
String bean() {
return new String();
}
}
as you may notice it does not have @Configuration annotation.
How can I make it behave like it has @Configuration annotation, but not adding it?
@Bean annotation should not work in Lite Mode, https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/Bean.html
Something like:
@Configuration
class MainConfiguration {
@Bean
MyConfiguration myConfiguration() {
MyConfiguration myConfiguration = do_some_spring_magic();
// myConfiguration behaving like it's having @Configuration here
return myConfiguration;
}
}