spring-web-context.xml
17 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<?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:util="http://www.springframework.org/schema/util"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:mvc="http://www.springframework.org/schema/mvc"
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.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
<aop:aspectj-autoproxy proxy-target-class="true"/>
<context:property-placeholder ignore-resource-not-found="true" location="classpath*:config.properties"/>
<!-- Spring扫描目录,通过注解的方式注入bean,只扫描本工程的目录 -->
<context:component-scan base-package="com.yohobuy"/>
<bean id="serviceGlobalExceptionHandler" class="com.yoho.error.exception.handler.ServiceGlobalExceptionHandler"/>
<!-- 启动SpringMVC的注解功能,完成请求和注解POJO的映射 -->
<mvc:annotation-driven>
<mvc:message-converters>
<ref bean="stringConverter"/>
<ref bean="jsonConverter"/>
</mvc:message-converters>
</mvc:annotation-driven>
<!--字符串转换器-->
<bean id="stringConverter"
class="org.springframework.http.converter.StringHttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>text/plain;charset=UTF-8</value>
</list>
</property>
</bean>
<!-- json转换器 application/json -->
<bean id="jsonConverter"
class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
<property name="features">
<array>
<value>DisableCircularReferenceDetect</value>
</array>
</property>
</bean>
<!-- 配置MultipartResolver 用于文件上传 使用spring的CommosMultipartResolver -->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="defaultEncoding" value="UTF-8"></property>
<property name="maxUploadSize" value="${file.maxsize}"></property>
<!-- <property name="uploadTempDir" value="${file.uploadTempDir}"></property>-->
<property name="resolveLazily" value="true"></property>
</bean>
<!-- 批量操作服务定义 -->
<util:map id="batchImportBusiness" key-type="java.lang.String"
value-type="com.yohobuy.platform.common.service.IBusinessImportService">
<!--<entry key="price" value-ref="PriceImportServiceImpl"></entry>
<entry key="brandCooperation" value-ref="brandCooperationImportServiceImpl"></entry>
<entry key="productPool" value-ref="productPoolImportServiceImpl"></entry>
<entry key="brandProperty" value-ref="BrandPropertyImportService"></entry>
<entry key="searchSort" value-ref="SearchSortImportService"></entry>
<entry key="baseProduct" value-ref="baseProductImportServiceImpl"></entry>
<entry key="productImg" value-ref="batchProdImgImportServiceImpl"></entry>
<entry key="productModelTry" value-ref="prodModelTryImportServiceImpl"></entry>
<entry key="outletModify" value-ref="batchModifyOutletImportServiceImpl"></entry>
<entry key="supplyModify" value-ref="batchModifySupplyImportServiceImpl"></entry>
<entry key="drawlineUserQueue" value-ref="DrawlineUserQueueImportServiceImpl"></entry>
<entry key="yohoCoin" value-ref="yohoCoinImportServiceImpl"></entry>
<entry key="payDeliveryModify" value-ref="batchModifyPayDeliveryImportServiceImpl"></entry>
<entry key="activityProduct" value-ref="activityProductService"></entry>
<entry key="refundExchangeModify" value-ref="batchModifyRefundExchangeImportServiceImpl"></entry>
<entry key="skuFactoryCodeModify" value-ref="updateSkuFactoryCodeServiceImpl"></entry>
<entry key="appTypeModify" value-ref="batchModifyAppTypeImportServiceImpl"></entry>
<entry key="productSaleModify" value-ref="batchModifyProductSaleImportServiceImpl"></entry>
<entry key="storeProductSaleModify" value-ref="batchModifyStoreProductSaleImportServiceImpl"></entry>
<entry key="productTagModify" value-ref="productTagImportServiceImpl"></entry>
<entry key="productPriceAudit" value-ref="batchAuditProductPriceServiceImpl"></entry>
<entry key="offShelveSkn" value-ref="OffShelveSknImportService"></entry>
<entry key="studentPrice" value-ref="studentPriceImportService" />
<entry key="limitProductUid" value-ref="limitUidImportServiceImpl"></entry>
<entry key="onShelveSkn" value-ref="onShelveBatchSknImportService" />
<entry key="categoryLinkProduct" value-ref="categoryLinkProductImportServiceImpl"></entry>
<entry key="batchSknLink" value-ref="batchSknLinkImportServiceImpl"></entry>
<entry key="secKill" value-ref="seckillImportServiceImpl"></entry>
<entry key="shopsPromote" value-ref="shopsPromoteImportService" />
<entry key="depositAdvance" value-ref="depositAdvanceImportServiceImpl"></entry>
<entry key="depositAdvanceTime" value-ref="depositAdvanceTimeImportImpl"></entry>
<entry key="productSingleDay" value-ref="productSingleDayService" />
<entry key="makePromtion" value-ref="MakePromotionImportServiceImpl"></entry>
<entry key="productSingleDay" value-ref="productSingleDayService" />
<entry key="productBundle" value-ref="productBundleService" />
<entry key="productBatch" value-ref="productBatchService" />
<entry key="sockpupetCommentsImport" value-ref="sockpupetCommentsImportServiceImpl"/>
<entry key="makePriceItemImport" value-ref="makePriceServiceImpl"/>
<entry key="productBuyLimitImport" value-ref="productBuyLimitServiceImpl"/>
<entry key="promotionPhrase" value-ref="PhraseBatchImportService"/>
<entry key="skcFactoryCode" value-ref="updateSkcFactoryCodeServiceImpl"/>
<entry key="sknYearAndSeason" value-ref="updateSknYearAndSeasonImpl"/>
<entry key="skuUpmCode" value-ref="updateUpmServiceImpl"/>
<entry key="brandSaleTime" value-ref="productBrandSaleTimeService"/>
<entry key="brandClassic" value-ref="productBrandClassicService"/>
<entry key="expectSaleTime" value-ref="productExpectSaleTimeService"/>
<entry key="brandImageBatch" value-ref="batchBrandImgImportServiceImpl"/>
<entry key="productPhrase" value-ref="productPhraseImportService"/>
<entry key="productSknImport" value-ref="productSknImportServiceImpl"/>
<entry key="productMaterialImport" value-ref="productMaterialServiceImpl"/>
<entry key="recProduct" value-ref="newUserRecProductImportServiceImpl"></entry>
<entry key="vipBatch" value-ref="vipServiceImpl"></entry>
<entry key="couponLimitImport" value-ref="couponLimitServiceImpl"></entry>
<entry key="activitySknImport" value-ref="activityRegistrationProductServiceImpl"></entry>
<entry key="sellerProductImport" value-ref="sellerProductImportService"></entry>
<entry key="unionUrlImport" value-ref="unionUrlImportServiceImpl"></entry>
<entry key="couponProductLimit" value-ref="couponProductLimitImportService"></entry>
<entry key="depositPrdImport" value-ref="depositPrdImportService"/>
<entry key="shopCrossRecServiceImpl" value-ref="shopCrossRecServiceImpl"></entry>
<entry key="advancePrdImport" value-ref="advancePrdImportService"></entry>
<entry key="updateSknName" value-ref="updateProductNameService"></entry>
<entry key="downSknName" value-ref="downloadProductNameService"></entry>
<entry key="productPoolBatchDel" value-ref="ProductPoolBatchDelImportServiceImpl"></entry>
<entry key="followPriceImport" value-ref="followPriceOperateService"></entry>
<entry key="nationalCodeImportService" value-ref="nationalCodeImportService"></entry>
<entry key="newNationalCodeImportService" value-ref="newNationalCodeImportService"></entry>
<entry key="collageImport" value-ref="collageProductServiceImpl"></entry>
<entry key="depositPrdDelImport" value-ref="depositPrdDelImportService" />
<entry key="reportFormChannelIdService" value-ref="reportFormChannelIdServiceImpl"/>
<entry key="distributionBatchImportService" value-ref="distributionBatchImportServiceImpl"/>
<entry key="shopCouponLimitImport" value-ref="shopCouponLimitServiceImpl"></entry>
<entry key="priceUpdateImport" value-ref="priceUpdateImportServiceImpl"></entry>
<entry key="vipReturnCoinBatch" value-ref="vipReturnCoinServiceImpl"></entry>
<entry key="changeSize" value-ref="changeSizeImportServiceImpl"></entry>-->
</util:map>
<!-- 批量操作服务定义 -->
<util:map id="batchExportBusiness" key-type="java.lang.String"
value-type="com.yohobuy.platform.common.service.IBusinessExportService">
<!--<entry key="netSale" value-ref="NetSaleExportServiceImpl"></entry>
<entry key="limitProductReminder" value-ref="LimitProductExportServiceImpl"></entry>
<entry key="drawlineUserQueue" value-ref="DrawlineUserQueueExportServiceImpl"></entry>
<entry key="yohoCoin" value-ref="yohoCoinExportService"></entry>
<entry key="suggestExport" value-ref="suggestExportService"/>
<entry key="linkExport" value-ref="linkExportService"/>
<entry key="linkBatchExport" value-ref="linkBatchExportService"/>
<entry key="brandPayDeliveryExport" value-ref="brandPayDeliveryExportServiceImpl"></entry>
<entry key="brandPayDeliveryCheckExport" value-ref="brandPayDeliveryCheckExportServiceImpl"></entry>
<entry key="productPayDeliveryExport" value-ref="productPayDeliveryExportServiceImpl"></entry>
<entry key="couponLogsExport" value-ref="couponLogsExportServiceImpl"></entry>
<entry key="useCouponLogsExport" value-ref="useCouponLogsExportServiceImpl"></entry>
<entry key="pCouponSnsExport" value-ref="pcouponSnsExportServiceImpl"></entry>
<entry key="baseProduce" value-ref="baseProduceExportServiceImpl"/>
<entry key="productRefundExchangeExport" value-ref="productRefundExchangeExportServiceImpl"></entry>
<entry key="productSortRefundExchangeExport" value-ref="productSortRefundExchangeExportServiceImpl"></entry>
<entry key="couponSendErrorExport" value-ref="couponSendErrorExportService"/>
<entry key="instalmentSknsExport" value-ref="instalmentSknsExportServiceImpl"/>
<entry key="shopSaleExport" value-ref="shopSaleExportServiceImpl"/>
<entry key="productSaleExport" value-ref="productSaleExportServiceImpl"/>
<entry key="productSaleOnShelvesExport" value-ref="productSaleOnShelvesExportServiceImpl"/>
<entry key="limitProductUid" value-ref="limitUidExportServiceImpl" />
<entry key="sns" value-ref="showCommentExportService" />
<entry key="changePriceExport" value-ref="changePriceExportServiceImpl"/>
<entry key="productPriceExport" value-ref="productPriceExportServiceImpl"/>
<entry key="makePromotionExportServiceImpl" value-ref="MakePromotionExportServiceImpl"/>
<entry key="userCouponHistoryExport" value-ref="userCouponHistoryExportService"/>
<entry key="userShareHistoryExport" value-ref="userShareHistoryExportService"/>
<entry key="productBatchServiceExport" value-ref="productBatchServiceExportImpl"/>
<entry key="productBundleServiceExport" value-ref="productBundleServiceExportImpl"/>
<entry key="exportConsultServiceExport" value-ref="exportConsultServiceImpl"/>
<entry key="productTagServiceExport" value-ref="productTagExportServiceImpl"/>
<entry key="channelProductServiceExport" value-ref="channelProductServiceExportImpl"/>
<entry key="promotionPhraseExport" value-ref="promotionPhraseExportImpl"/>
<entry key="reportFormExport" value-ref="reportFormServiceImpl"/>
<entry key="channelProductServiceExport" value-ref="channelProductServiceExportImpl"/>
<entry key="productExportServiceImpl" value-ref="productExportService"/>
<entry key="timeLimitDepositImportErrorMsgExport" value-ref="timeLimitDepositImportErrorMsgExportService" />
<entry key="couponExport" value-ref="couponExportService" />
<entry key="distributionBatchExportService" value-ref="distributionBatchExportServiceImpl"/>
<entry key="collageActivityExport" value-ref="collageActivitiesServiceImpl" />
<entry key="batchExportReturnCoin" value-ref="VipReturnCoinExportServiceImpl" />-->
</util:map>
<!-- 批量操作服务定义 -->
<!--<util:map id="scheduledBusiness" key-type="java.lang.String"
value-type="com.yohobuy.platform.product.service.scheduled.ScheduledService">
<entry key="scheduledOnSaleAndNew" value-ref="scheduledOnSaleAndNew"></entry>
<entry key="scheduledOnSaleNoNew" value-ref="scheduledOnSaleNoNew"></entry>
<entry key="scheduledUpdatePrice" value-ref="scheduledUpdatePrice"/>
<entry key="scheduledOutale" value-ref="scheduledOutale"/>
<!–<entry key="scheduledPushSecKillRemind" value-ref="scheduledPushSecKillRemind"/>–>
<entry key="scheduledSynChannelProduct" value-ref="scheduledSynChannelProduct"></entry>
<entry key="scheduledChangeChannelProductPrice" value-ref="scheduledChangeChannelProductPrice"></entry>
<entry key="scheduledUpdateMakePrice" value-ref="scheduledUpdateMakePrice"></entry>
<entry key="scheduledSynChannelProductMany" value-ref="scheduledSynChannelProductMany"></entry>
</util:map>-->
<!-- 批量操作服务定义 -->
<!-- <util:map id="shopScheduledBusiness" key-type="java.lang.String"
value-type="com.yohobuy.platform.shops.service.scheduledService.ShopScheduledService">
<entry key="scheduledShopMessage" value-ref="scheduledShopMessage"></entry>
</util:map>-->
<!-- <util:map id="promotionScheduledBusiness" key-type="java.lang.String"
value-type="com.yohobuy.promotion.service.scheduled.PromotionScheduledService">
<entry key="scheduledExpiredLimitCode" value-ref="scheduledExpiredLimitCode"></entry>
<entry key="scheduledExpiredSecKill" value-ref="scheduledExpiredSecKill"></entry>
</util:map>-->
<!--service接口调用拦截器-->
<!--<bean id="serviceMethodInterceptor" class="com.yoho.core.common.monitor.interceptor.MethodProfileInterceptor">-->
<!--</bean>-->
<!--<aop:config>-->
<!--<aop:pointcut id="serviceMethodPoint"-->
<!--expression="(execution(* com.yohobuy.platform.*.service.*.*(..))) or (execution(* com.yohobuy.platform.*.restapi.*.*(..))) "/>-->
<!--<aop:advisor pointcut-ref="serviceMethodPoint" advice-ref="serviceMethodInterceptor"/>-->
<!--</aop:config>-->
<!-- 图片批量上传异步线程池 -->
<bean id="threadPool" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="5"/>
<property name="maxPoolSize" value="20"/>
<property name="queueCapacity" value="1000"/>
<property name="keepAliveSeconds" value="300"/>
<property name="rejectedExecutionHandler">
<bean class="java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy"/>
</property>
</bean>
<!--操作日志的拦截器-->
<bean id="operateRecodeAnnotationInterceptor" class="com.yohobuy.platform.common.interceptor.OperateRecodeInterceptor">
<property name="sellerControllerPath" value="com.yohobuy.platform.seller"></property>
</bean>
<aop:config>
<aop:pointcut id="operateRecodeAnnotionPoint"
expression="within(@org.springframework.stereotype.Controller * or @org.springframework.web.bind.annotation.RestController *)"/>
<aop:advisor pointcut-ref="operateRecodeAnnotionPoint" advice-ref="operateRecodeAnnotationInterceptor"/>
</aop:config>
<bean id="batchForkJoinPool" class="java.util.concurrent.ForkJoinPool" >
</bean>
<!--Excel模板生成器配置-->
<util:map id="TemplateCreators" key-type="java.lang.String"
value-type="com.yohobuy.platform.common.service.IExcelTemplatService">
<!--商家端批量创建商品模板-->
</util:map>
</beans>