how to load additional bean configuration file in spring at run time - Stack Overflow
If you're using the classpath scanning but you still want o load additional configurations from XML, you can simply use the@ImportResource
annotation on your @Configuration
class and import the XML resource you need: @Configuration @ImportResource( { "classpath*:/rest_config.xml" } ) public class MyConfig{ ... }
That way it's easy to mix in legacy XML configuration with newer, Java configs and you don't have to - for example - migrate your entire configuration in one go.Read full article from how to load additional bean configuration file in spring at run time - Stack Overflow
No comments:
Post a Comment