springdependency-injectionxml-import

How to import spring bean's configuration file in Maven dependency to an other in my Maven project?


I add local maven repository, I add the local dependency in my project. this dependency encompass a Spring configuration file . I want to import this file in an other spring configuration file. What should I do ?

knowing that the dependency tree that includes the file to be imported is as follows: {dependencyXXX}.jar>{PackageByDefault}>springInjectDateAsString.xml


Solution

  • You should be able to just put this in your application context:

    <import resource="classpath*:/springInjectDateAsString.xml" />