2023-11-19 20:22:05 -08:00

39 lines
1.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="mindmapSessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
<property name="dataSource" ref="wiseDataSource"/>
<property name="annotatedClasses">
<list>
<value>com.wisemapping.model.User</value>
<value>com.wisemapping.model.Collaborator</value>
<value>com.wisemapping.model.Collaboration</value>
<value>com.wisemapping.model.Mindmap</value>
<value>com.wisemapping.model.Label</value>
<value>com.wisemapping.model.CollaborationProperties</value>
<value>com.wisemapping.model.AccessAuditory</value>
<value>com.wisemapping.model.MindMapHistory</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${database.hibernate.dialect}</prop>
<!-- <prop key="hibernate.cache.use_second_level_cache">true</prop>-->
<!-- <prop key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</prop>-->
<prop key="hibernate.default_batch_fetch_size">200</prop>
<prop key="hibernate.nestedTransactionAllowed">true</prop>
<prop key="hibernate.auto_quote_keyword">true</prop>
</props>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager">
<property name="sessionFactory" ref="mindmapSessionFactory"/>
<property name="nestedTransactionAllowed" value="true"/>
</bean>
</beans>