我在哪里可以找到hibernateProperties?

时间:2015-05-19 13:52:18

标签: hibernate spring-mvc

我没有在类路径中放置任何hibernate.properties,因此如果没有找到密钥,为什么它不会为密钥hibernate.show_sql的$ {test}抛出任何异常。

<bean id="sessionFactory"
        class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
         <property name="mappingLocations">
            <list>
                <value>classpath:test.hbm.xml</value>
            </list>
        </property> 
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
                <prop key="hibernate.show_sql">${test}</prop>
                <prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
                <prop key="hibernate.jdbc.use_get_generated_keys">true</prop>
            </props>
        </property>
    </bean>

0 个答案:

没有答案
相关问题