-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixture-data.xml
59 lines (50 loc) · 2.63 KB
/
fixture-data.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
56
57
58
59
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
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
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">
<tx:annotation-driven mode="aspectj"/>
<jpa:repositories base-package="io.fixture.data.repository"/>
<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.data.model">
<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>