-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcachestore-context.xml
94 lines (84 loc) · 4.65 KB
/
cachestore-context.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?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
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<import resource="datasource-context.xml" />
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mapperLocations" value="classpath*:META-INF/mybatis/**/*.xml" />
</bean>
<bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate">
<constructor-arg index="0" ref="sqlSessionFactory" />
<constructor-arg index="1" value="BATCH" />
</bean>
<bean id="SpringMyBatisCacheStore"
class="com.simukappu.coherence.cachestore.spring.mybatis.SpringMyBatisCacheStore">
<property name="sqlSession" ref="sqlSession" />
<property name="selectSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.selectParentEntity" />
<property name="insertSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.insertParentEntity" />
<property name="updateSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.updateParentEntity" />
<property name="deleteSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.deleteParentEntity" />
</bean>
<bean id="SpringMyBatisCacheStoreWriteOnly"
class="com.simukappu.coherence.cachestore.spring.mybatis.SpringMyBatisCacheStoreWriteOnly">
<property name="sqlSession" ref="sqlSession" />
<property name="insertSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.insertParentEntity" />
</bean>
<bean id="SpringMyBatisCacheStoreWriteOnceOnly"
class="com.simukappu.coherence.cachestore.spring.mybatis.SpringMyBatisCacheStoreWriteOnceOnly">
<property name="sqlSession" ref="sqlSession" />
<property name="selectSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.selectParentEntity" />
</bean>
<bean id="SpringMyBatisCacheStoreReadOnly"
class="com.simukappu.coherence.cachestore.spring.mybatis.SpringMyBatisCacheStoreReadOnly">
<property name="sqlSession" ref="sqlSession" />
<property name="insertSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.insertParentEntity" />
</bean>
<bean id="SpringMyBatisCacheStoreWithChildEntities"
class="com.simukappu.coherence.cachestore.spring.mybatis.SpringMyBatisCacheStoreWithChildEntities">
<property name="sqlSession" ref="sqlSession" />
<property name="selectSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.selectParentEntity" />
<property name="insertSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.insertParentEntity" />
<property name="updateSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.updateParentEntity" />
<property name="deleteSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.deleteParentEntity" />
<property name="selectOneChildSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.selectOneChildEntity" />
<property name="selectChildenSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.selectChildEntities" />
<property name="insertChildSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.insertChildEntity" />
<property name="deleteChildenSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.deleteChildEntities" />
<property name="entityClass">
<value type="java.lang.Class">test.com.simukappu.coherence.entity.TestParentEntity
</value>
</property>
<property name="childenField" value="children"></property>
</bean>
<bean id="SpringMyBatisCacheStoreWithChildEntitiesWriteOnceOnly"
class="com.simukappu.coherence.cachestore.spring.mybatis.SpringMyBatisCacheStoreWithChildEntitiesWriteOnceOnly">
<property name="sqlSession" ref="sqlSession" />
<property name="insertSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.insertParentEntity" />
<property name="insertChildSql"
value="test.com.simukappu.coherence.cachestore.spring.mybatis.mapper.insertChildEntity" />
<property name="entityClass">
<value type="java.lang.Class">test.com.simukappu.coherence.entity.TestParentEntity
</value>
</property>
<property name="childenField" value="children"></property>
</bean>
</beans>