hibernate 与spring 集成,没法获取数据
hibernate 与spring 集成,无法获取数据。
1. applicationContext.xml 在文件没有配置 对应的xml映射文件,查询数据的时候,也不报错,但是就是查不到数据。
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
<prop key="hibernate.jdbc.bach_size">20</prop>
<prop key="hibernate.cache.use_query_cache">false</prop>
<prop key="hibernate.show_sql">false</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/test/networkmanage/db/maping.hbm.xml</value>
</list>
</property>
</bean>