title: hibernate configuration with mapping classes in spring config
body: <p>well i need almost the same thing as in this question <a href="https://stackoverflow.com/questions/5379791/how-do-you-translate-hibernate-class-mappings-to-a-spring-application-context?rq=1">How do you translate Hibernate class mappings to a Spring application context?</a></p>
  
  <p>but i shouldn't use annotations, i need to save xml mapping, so how should i specify mappings in spring config? </p>
  
  <p>P. S. sorry for possible duplicate, but i have seen only annotation-based suggestions </p>
  
  <p>my current configuration with annotations : 
  hibernate.cfg.xml</p>
  
  <pre><code>&lt;hibernate-configuration&gt;
      &lt;session-factory&gt;
          &lt;property name="hibernate.connection.driver_class"&gt;oracle.jdbc.driver.OracleDriver&lt;/property&gt;
          &lt;property name="hibernate.connection.url"&gt;jdbc:oracle:thin:@127.0.0.1:1521/XE&lt;/property&gt;
          &lt;property name="hibernate.connection.username"&gt;username&lt;/property&gt;
          &lt;property name="hibernate.connection.password"&gt;pass&lt;/property&gt;
          &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/property&gt;
  
          &lt;property name="show_sql"&gt;true&lt;/property&gt;
          &lt;mapping class="com.foo.domain.News"&gt;&lt;/mapping&gt;
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>applicationContext.xml sessionFactory bean:</p>
  
  <pre><code>&lt;bean id="sessionFactory"
          class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource" /&gt;
          &lt;property name="configLocation"&gt;
              &lt;value&gt;/WEB-INF/hibernate.cfg.xml&lt;/value&gt;
          &lt;/property&gt;
  
          &lt;property name="configurationClass"&gt;
              &lt;value&gt;org.hibernate.cfg.AnnotationConfiguration&lt;/value&gt;
          &lt;/property&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;${DIALECT}&lt;/prop&gt;
                  &lt;prop key="hibernate.connection.charSet"&gt;UTF-8&lt;/prop&gt;
  
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>