I have a project where I need to bootstrap @Configuration java-config classes into the XML configuration.
To do that, I\'m reading that I also need to include the fo
This actually ended up being fairly simple. To get a Java-config bean definition into the xml-config, simply define the Java-config class as a bean within the XML-config. There are no extra jars necessary.
@Configuration
public class SomeJavaConfig {
@bean
... [bean definition]
}
inside the XML-config, you define this class as a bean.
The XML-config, which may be part of a different context, now has all the bean definitions defined within the JavaConfig class.
UPDATED - to included Alan Franzoni's comment below in the answer.