-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixture-domain.xml
55 lines (47 loc) · 2.36 KB
/
fixture-domain.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
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
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<tx:annotation-driven mode="aspectj"/>
<bean id="dataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource"
p:jdbcUrl="jdbc:h2:mem:fixture;MVCC=TRUE"
p:maxPoolSize="200"
p:initialPoolSize="100"/>
<!--
<bean id="dataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource"
p:jdbcUrl="jdbc:h2:file:#{systemProperties['java.io.tmpdir']}/fixture;MVCC=TRUE"
p:maxPoolSize="200"
p:initialPoolSize="100"/>
-->
<bean id="jpaVendorAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
p:database="H2"/>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
depends-on="liquibase"
p:dataSource-ref="dataSource"
p:jpaVendorAdapter-ref="jpaVendorAdapter"
p:packagesToScan="io.fixture.domain">
<property name="jpaProperties">
<props>
<prop key="net.sf.ehcache.configurationResourceName">/META-INF/ehcache/ehcache.xml</prop>
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.hbm2ddl.auto">validate</prop>
</props>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager"
p:entityManagerFactory-ref="entityManagerFactory"/>
<bean id="liquibase"
class="liquibase.integration.spring.SpringLiquibase"
p:dataSource-ref="dataSource"
p:changeLog="classpath:/META-INF/liquibase/changelog.xml"/>
</beans>