日期:2014-05-17 浏览次数:20845 次
<bean id="framework.support.hibernate.sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean" lazy-init="false"> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">${framework.hibernate.dialect}</prop> <prop key="hibernate.hbm2ddl.auto">${framework.hibernate.hbm2ddl.auto}</prop> <prop key="hibernate.show_sql">${framework.hibernate.show_sql}</prop> <prop key="hibernate.jdbc.batch_size">30</prop> <prop key="hibernate.order_inserts">true</prop> <prop key="hibernate.order_updates">true</prop> <prop key="hibernate.current_session_context_class">org.springframework.orm.hibernate4.SpringSessionContext </prop> <!-- cache --> <prop key="net.sf.ehcache.configurationResourceName">${framework.net.sf.ehcache.configurationResourceName}</prop> <prop key="hibernate.cache.use_second_level_cache">${framework.hibernate.cache.use_second_level_cache}</prop> <prop key="hibernate.cache.use_query_cache">${framework.hibernate.cache.use_query_cache}</prop> <prop key="hibernate.cache.provider_class">${framework.hibernate.cache.provider_class}</prop> <prop key="hibernate.cache.region.factory_class">${framework.hibernate.cache.region.factory_class}</prop> </props> </property> <property name="dataSource" ref="framework.support.dataSource" /> <property name="mappingDirectoryLocations"> <list> <value>classpath:com/hzyl</value> </list> </property> </bean>