title: How to load a spring configuration from another dependency module
body: <p>I'm working on a spring application that contains submodules, roughly looking like the following:</p>
  
  <p>project</p>
  
  <pre><code>|-- module1
  ||-- src
  ||      -- main
  ||       |-- java
  ||       -- resources
  ||           |-- null
  ||   -- pom.xml
  </code></pre>
  
  <p>Module 2:</p>
  
  <pre><code>|-- module2
  |   |-- src
  |   |   -- main
  |   |       |-- java
  |   |       -- resources
  |   |           -- spring-dao.xml
  |   -- pom.xml
  -- pom.xml
  </code></pre>
  
  <p>now,I'm using Juit4 to test module1,while I have to offer <code>spring-dao.xml</code> in module1,like this:
  <code>@ContextConfiguration({"classpath*:spring/spring-dao.xml"})</code></p>
  
  <p>But the spring configuration file(<code>spring-dao.xml</code>) is in module2, and module2 is dependent on module1. That causes I can't put module2.jar into module1 via the pom.xml of module1 as it causes a module cycle.</p>
  
  <p>How can I test module1?</p>