spring-mvc.xml
6.06 KB
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
125
126
127
128
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:util="http://www.springframework.org/schema/util"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">
<context:component-scan base-package="com.yoho"/>
<mvc:annotation-driven/>
<task:annotation-driven/>
<bean id="springContextUtil" class="com.yoho.unions.common.utils.SpringContextUtil"/>
<!-- 装在properties文件 -->
<context:property-placeholder location="classpath*:config.properties"/>
<!-- <bean id="restServiceBeanRegistry" class="com.yoho.core.rest.spring.RestServiceBeanRegistry">
<property name="registry" ref="serviceRegistry"></property>
</bean> -->
<bean id="serviceGlobalExceptionHandler" class="com.yoho.error.exception.handler.ServiceGlobalExceptionHandler"/>
<!-- 启动SpringMVC的注解功能,完成请求和注解POJO的映射 -->
<bean
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="messageConverters">
<list>
<ref bean="stringConverter"/>
<ref bean="jsonConverter"/>
</list>
</property>
</bean>
<bean id="stringConverter"
class="org.springframework.http.converter.StringHttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>text/plain;charset=UTF-8</value>
</list>
</property>
</bean>
<util:map id="orderPushServiceMap" key-type="java.lang.String"
value-type="com.yoho.unions.server.service.IOrderPushService">
<entry key="3001" value-ref="fanliServiceImpl"/>
<entry key="3063" value-ref="fanliServiceImpl"/>
<entry key="3419" value-ref="panshiServiceImpl"/>
</util:map>
<!-- 输出对象转JSON支持 -->
<bean id="jsonConverter"
class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
</bean>
<bean id="urlInterceptor" class="com.yoho.unions.common.restapi.interceptor.UrlInterceptor">
<!-- 一级免过滤列表(不需要登录,就可以访问的url) -->
<property name="firstNoFilterList">
<list>
<value>loginForPid.do</value>
<value>logout.do</value>
<value>export.do</value>
</list>
</property>
<!-- 只要登录,就能访问的url -->
<property name="secondNoFilterList">
<list>
<value>NoFilterController.do</value>
</list>
</property>
<property name="superManagerList">
<list>
<value>admin</value>
</list>
</property>
</bean>
<bean id="remoteIPInterceptor" class="com.yoho.unions.interceptor.RemoteIPInterceptor"/>
<mvc:interceptors>
<ref bean="securityInterceptor"/>
<ref bean="threadProfileInterceptor"/>
<ref bean="urlInterceptor"/>
<ref bean="remoteIPInterceptor"/>
</mvc:interceptors>
<!-- 配置MultipartResolver 用于文件上传 使用spring的CommosMultipartResolver -->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="defaultEncoding" value="UTF-8"></property>
<property name="maxUploadSize" value="10485760"></property>
<!-- <property name="uploadTempDir" value="${file.uploadTempDir}"></property>-->
<property name="resolveLazily" value="true"></property>
</bean>
<bean id="idfaMatchImportServiceImpl" class="com.yoho.unions.server.service.impl.DeviceIdMatchImportServiceImpl" >
<property name="isIdfa" value="1"/>
</bean>
<bean id="imeiMatchImportServiceImpl" class="com.yoho.unions.server.service.impl.DeviceIdMatchImportServiceImpl" >
<property name="isIdfa" value="0"/>
</bean>
<!-- 批量操作服务定义 -->
<util:map id="batchImportBusiness" key-type="java.lang.String"
value-type="com.yoho.unions.common.service.IBusinessImportService">
<entry key="MobileUidImport" value-ref="userInfoImportServiceImpl"/>
<entry key="idfaMatchImport" value-ref="idfaMatchImportServiceImpl"/>
<entry key="imeiMatchImport" value-ref="idfaMatchImportServiceImpl"/>
<entry key="unionShareOrdersMonthImport" value-ref="unionShareOrdersMonthImportServiceImpl"/>
</util:map>
<!-- 批量操作服务定义 -->
<util:map id="batchExportBusiness" key-type="java.lang.String"
value-type="com.yoho.unions.common.service.IBusinessExportService">
<entry key="channelUserServiceImpl" value-ref="channelUserServiceImpl"/>
<entry key="userOrdersServiceImpl" value-ref="userOrdersServiceImpl"/>
<entry key="unionShareServiceImpl" value-ref="unionShareServiceImpl"/>
<entry key="unionShareApplyExportImpl" value-ref="unionShareApplyExportImpl"/>
<entry key="userRegisterBuyInfoserviceImpl" value-ref="userRegisterBuyInfoserviceImpl"/>
<entry key="activeClickExportImpl" value-ref="unionServiceImpl"/>
</util:map>
</beans>