title: Could not open ServletContext resource [/jdbc.properties] after switch to Java 1.8-Spring 4
body: <p>I have two Spring Projects, Backend and Frontend. The Upgrade of backend was trouble-free (Spring 4.1.2.RELEASE). While deploying the frontend i have this Exception:</p>
  
  <pre><code>org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [acn.spring.config.AppConfig]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/jdbc.properties]
      at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:489)
  ....
  Caused by: 
  java.io.FileNotFoundException: Could not open ServletContext resource [/jdbc.properties]
  </code></pre>
  
  <p>This is the WebAppInitializer for Frontend:</p>
  
  <pre><code>@Configuration
  public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
  
      @Override
      protected Class&lt;?&gt;[] getRootConfigClasses() {
          return new Class&lt;?&gt;[] { AppConfig.class };
      }
      .....
  </code></pre>
  
  <p>Appconfig is in backend project and looks like this:</p>
  
  <pre><code>@Import(DataConfig.class)
  @Configuration
  public class AppConfig {
     ...
  }
  </code></pre>
  
  <p>The missing property file is used in DataConfig which is imported here:</p>
  
  <pre><code>@PropertySource("jdbc.properties")
  @Configuration
  public class DataConfig {
     ...
  }
  </code></pre>
  
  <p>Why could not the property file not be found?</p>
  
  <p>EDIT: Jar structure of the backend:</p>
  
  <ul>
  <li>META-INF
  <ul>
  <li>MANIFEST.MF</li>
  <li>maven</li>
  </ul></li>
  <li>mySourcePackages Structure</li>
  <li>jdbc.properties  </li>
  </ul>
  
  <p>War structure of the frontend:</p>
  
  <ul>
  <li>META-INF
  <ul>
  <li>MANIFEST.MF</li>
  <li>maven</li>
  </ul></li>
  <li>resources</li>
  <li>WEB-INF
  <ul>
  <li>classes
  <ul>
  <li>mySourcePackages Structure</li>
  </ul></li>
  <li>jsp</li>
  <li>lib
  <ul>
  <li>all the jars including backend.jar</li>
  </ul></li>
  </ul></li>
  </ul>