title: Intellij IDEA doesn't detect properties from properties-file
body: <p>I've come across one nasty situation and couldn't solve it. I wrote SpringMVC + Hibernate application with Intellij IDEA. I wanna put all my jdbc properties (connection url, username and etc.) in jdbc.properties, but IDEA can't detect them in this file. Here is my WEB-INF/dispatcher-servlet.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:p="http://www.springframework.org/schema/p"
         xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:util="http://www.springframework.org/schema/util"
         xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"&gt;
  
      &lt;mvc:annotation-driven/&gt;
      &lt;context:component-scan base-package="com.controllers"/&gt;
  
      &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/&gt;
          &lt;property name="prefix" value="/WEB-INF/jsp/"/&gt;
          &lt;property name="suffix" value=".jsp"/&gt;
      &lt;/bean&gt;
  
      &lt;bean id="fileCreator" class="com.utilites.FileCreator"/&gt;
  
      &lt;tx:annotation-driven transaction-manager="transactionManager"/&gt;
  
      &lt;bean id="dataSource"
            class="org.springframework.jdbc.datasource.DriverManagerDataSource"
            p:driverClassName="${jdbc.driverClassName}"
            p:url="${jdbc.url}"
            p:username="${jdbc.username}"
            p:password="${jdbc.password}"/&gt;
  
      &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource"/&gt;
          &lt;property name="configLocation"&gt;
              &lt;value&gt;classpath:hibernate.cfg.xml&lt;/value&gt;
          &lt;/property&gt;
          &lt;!--&lt;property name="configurationClass"&gt;--&gt;
          &lt;!--&lt;value&gt;org.hibernate.cfg.AnnotationConfiguration&lt;/value&gt;--&gt;
          &lt;!--&lt;/property&gt;--&gt;
          &lt;property name="hibernateProperties"&gt;
              &lt;props&gt;
                  &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
                  &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt;
                  &lt;prop key="hibernate.connection.charSet"&gt;UTF-8&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean id="transactionManager"
            class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;
          &lt;property name="sessionFactory" ref="sessionFactory"/&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>and my jdbc.properties contains:</p>
  
  <pre><code>jdbc.driverClassName=com.mysql.jdbc.Driver
  jdbc.dialect=org.hibernate.dialect.MySQLDialect
  jdbc.url=jdbc:mysql://localhost:3306/Overhaul
  jdbc.username=root
  jdbc.password=
  </code></pre>
  
  <p>and mysql-dependency in pom.xml:</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;version&gt;5.1.32&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>and my snippet of project structure:
  <img src="https://i.stack.imgur.com/9U3iF.jpg" alt="enter image description here"></p>
  
  <p>When I build the project and deploy it, Tomcat shows me this error:</p>
  
  <pre><code>PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [${jdbc.driverClassName}];
  </code></pre>
  
  <p>What's wrong in my app or somewhere esle?</p>