forked from ufologist/RAP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapplicationContext.xml
124 lines (117 loc) · 4.86 KB
/
applicationContext.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?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-2.5.xsd">
<!-- 根据Name匹配拦截器 [email protected] -->
<bean
class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames">
<list>
<value>*Mgr</value>
<value>*Service</value>
<value>*Proxy</value>
</list>
</property>
<property name="interceptorNames">
<list>
<!-- main_db事务管理的Interceptor -->
<value>transactionInterceptor</value>
</list>
</property>
</bean>
<import resource="classpath:/com/taobao/rigel/rap/common/applicationContext.xml" />
<import resource="classpath:/com/taobao/rigel/rap/project/applicationContext.xml" />
<import resource="classpath:/com/taobao/rigel/rap/workspace/applicationContext.xml" />
<import resource="classpath:/com/taobao/rigel/rap/account/applicationContext.xml" />
<import resource="classpath:/com/taobao/rigel/rap/mock/applicationContext.xml" />
<import resource="classpath:/com/taobao/rigel/rap/organization/applicationContext.xml" />
<import resource="classpath:/com/taobao/rigel/rap/api/applicationContext.xml" />
<import resource="classpath:/com/taobao/rigel/rap/platform/applicationContext.xml" />
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:/mysql.local.properties</value>
</list>
</property>
</bean>
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass">
<value>${jdbc.driverClassName}</value>
</property>
<property name="jdbcUrl">
<value>${jdbc.url}</value>
</property>
<property name="user">
<value>${jdbc.username}</value>
</property>
<property name="password">
<value>${jdbc.password}</value>
</property>
<property name="maxPoolSize">
<value>${jdbc.maxPoolSize}</value>
</property>
<property name="minPoolSize">
<value>${jdbc.minPoolSize}</value>
</property>
<property name="idleConnectionTestPeriod">
<value>${jdbc.idleConnectionTestPeriod}
</value>
</property>
<property name="maxIdleTime">
<value>${jdbc.maxIdleTime}</value>
</property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource" />
</property>
<property name="mappingResources">
<list>
<value>com/taobao/rigel/rap/project/mapping/Project.hbm.xml</value>
<value>com/taobao/rigel/rap/project/mapping/Module.hbm.xml</value>
<value>com/taobao/rigel/rap/project/mapping/Page.hbm.xml</value>
<value>com/taobao/rigel/rap/project/mapping/Action.hbm.xml</value>
<value>com/taobao/rigel/rap/project/mapping/Parameter.hbm.xml</value>
<value>com/taobao/rigel/rap/account/mapping/User.hbm.xml</value>
<value>com/taobao/rigel/rap/account/mapping/Role.hbm.xml</value>
<value>com/taobao/rigel/rap/account/mapping/Notification.hbm.xml</value>
<value>com/taobao/rigel/rap/workspace/mapping/Workspace.hbm.xml</value>
<value>com/taobao/rigel/rap/workspace/mapping/Save.hbm.xml</value>
<value>com/taobao/rigel/rap/workspace/mapping/CheckIn.hbm.xml</value>
<value>com/taobao/rigel/rap/organization/mapping/Corporation.hbm.xml</value>
<value>com/taobao/rigel/rap/organization/mapping/Group.hbm.xml</value>
<value>com/taobao/rigel/rap/organization/mapping/ProductionLine.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">false</prop>
</props>
</property>
</bean>
<bean id="baseDao" abstract="true">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<bean id="transactionInterceptor"
class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager" />
<property name="transactionAttributes">
<props>
<!--<prop key="query*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="is*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
--><prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
</beans>