0

Perhaps I phrased the question wrong. I meant to say that I want to load all java configuration file available in the class path instead of the applicationContext.xml. Something like this -

@Configuration
@ImportResource("Some other configuration java files which might be in the dependant projects but in the same classpath")  
public class AppConfig {

}
  • 2
    `@ImportResource`. See http://stackoverflow.com/questions/15004674/spring-3-importresource-with-multiple-files – dnault Mar 06 '17 at 18:15

1 Answers1

1

Try with @ImportResource annotation to import your xml configuration in java based configuration

@Configuration  
@ImportResource("classpath*:beancontext/applicationContext.xml")  
public class AppConfig {

}  
Monzurul Shimul
  • 8,132
  • 2
  • 28
  • 42