SPI扩展点在业务中的使用及原理分析

打印 上一主题 下一主题

主题 882|帖子 882|积分 2646

1 什么是SPI

SPI 全称Service Provider Interface。面向接口编程中,我们会根据不同的业务抽象出不同的接口,然后根据不同的业务实现建立不同规则的类,因此一个接口会实现多个实现类,在具体调用过程中,指定对应的实现类,当业务发生变化时会导致新增一个新的实现类,亦或是导致已经存在的类过时,就需要对调用的代码进行变更,具有一定的侵入性。
整体机制图如下:

Java SPI 实际上是“基于接口的编程+策略模式+配置文件”组合实现的动态加载机制。
2 SPI在京喜业务中的使用

2.1 简介

目前仓储中台和京喜BP的合作主要通过SPI扩展点的方式。好处就是对修改封闭、对扩展开放,中台不需要关心BP的业务实现细节,通过对不同BP配置扩展点的接口来达到个性化的目的。目前京喜BP主要提供两种方式的接口实现,一种是jar包的方式,一种是提供jsf接口。
下边来分别介绍下两种方式的定义和实现。
2.2 jar包方式

2.2.1 说明及示例

扩展点接口继承IDomainExtension,这个接口是dddplus包中的一个插件化接口,实现类要使用Extension(io.github.dddplus.annotation)注解,标记BP业务方和接口识别名称,用来做个性化的区分实现。
以在库库存盘点扩展点为例,接口定义在调用方提供的jar中,定义如下:
  1. public interface IProfitLossEnrichExt extends IDomainExtension {
  2. <?xml version="1.0" encoding="UTF-8"?>
  3. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  5.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  6.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  7.        http://jsf.jd.com/schema/jsf
  8.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  9.        default-lazy-init="false" default-autowire="byName">
  10.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  11.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  12. </beans>@Valid
  13. <?xml version="1.0" encoding="UTF-8"?>
  14. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  15.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  16.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  17.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  18.        http://jsf.jd.com/schema/jsf
  19.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  20.        default-lazy-init="false" default-autowire="byName">
  21.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  22.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  23. </beans>@Comment({"批量盘盈亏数据丰富扩展", "扩展的属性请放到对应明细的 extendContent.extendAttr Map字段中:profitLossBatchDetail.putExtendAttr(key, value)"})
  24. <?xml version="1.0" encoding="UTF-8"?>
  25. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  26.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  27.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  28.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  29.        http://jsf.jd.com/schema/jsf
  30.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  31.        default-lazy-init="false" default-autowire="byName">
  32.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  33.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  34. </beans>List<ProfitLossBatchDetailExt> enrich(@NotEmpty List<ProfitLossBatchDetailExt> var1);
  35. }
复制代码
实现类定义在服务提供方的jar中,如下:
  1. 实现类:/**
  2. * ProfitLossEnrichExtImpl
  3. * 批量盘盈亏数据丰富扩展
  4. *
  5. * @author jiayongqiang6
  6. * @date 2021-10-15 11:30
  7. */
  8. @Extension(code = IPartnerIdentity.JX_CODE, value = "jxProfitLossEnrichExt")
  9. @Slf4j
  10. public class ProfitLossEnrichExtImpl implements IProfitLossEnrichExt {
  11. <?xml version="1.0" encoding="UTF-8"?>
  12. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  13.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  14.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  15.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  16.        http://jsf.jd.com/schema/jsf
  17.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  18.        default-lazy-init="false" default-autowire="byName">
  19.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  20.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  21. </beans>private SkuInfoQueryService skuInfoQueryService;
  22. <?xml version="1.0" encoding="UTF-8"?>
  23. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  24.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  25.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  26.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  27.        http://jsf.jd.com/schema/jsf
  28.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  29.        default-lazy-init="false" default-autowire="byName">
  30.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  31.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  32. </beans>@Override
  33. <?xml version="1.0" encoding="UTF-8"?>
  34. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  35.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  36.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  37.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  38.        http://jsf.jd.com/schema/jsf
  39.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  40.        default-lazy-init="false" default-autowire="byName">
  41.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  42.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  43. </beans>public @Valid @Comment({"批量盘盈亏数据丰富扩展", "扩展的属性请放到对应明细的 extendContent.extendAttr Map字段中:profitLossBatchDetail" +
  44. <?xml version="1.0" encoding="UTF-8"?>
  45. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  46.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  47.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  48.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  49.        http://jsf.jd.com/schema/jsf
  50.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  51.        default-lazy-init="false" default-autowire="byName">
  52.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  53.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  54. </beans><?xml version="1.0" encoding="UTF-8"?>
  55. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  56.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  57.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  58.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  59.        http://jsf.jd.com/schema/jsf
  60.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  61.        default-lazy-init="false" default-autowire="byName">
  62.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  63.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  64. </beans><?xml version="1.0" encoding="UTF-8"?>
  65. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  66.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  67.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  68.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  69.        http://jsf.jd.com/schema/jsf
  70.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  71.        default-lazy-init="false" default-autowire="byName">
  72.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  73.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  74. </beans>".putExtendAttr(key, value)"}) List<ProfitLossBatchDetailExt> enrich(@NotEmpty List<ProfitLossBatchDetailExt> list) {
  75. <?xml version="1.0" encoding="UTF-8"?>
  76. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  77.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  78.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  79.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  80.        http://jsf.jd.com/schema/jsf
  81.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  82.        default-lazy-init="false" default-autowire="byName">
  83.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  84.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  85. </beans><?xml version="1.0" encoding="UTF-8"?>
  86. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  87.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  88.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  89.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  90.        http://jsf.jd.com/schema/jsf
  91.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  92.        default-lazy-init="false" default-autowire="byName">
  93.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  94.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  95. </beans>...
  96. <?xml version="1.0" encoding="UTF-8"?>
  97. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  98.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  99.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  100.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  101.        http://jsf.jd.com/schema/jsf
  102.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  103.        default-lazy-init="false" default-autowire="byName">
  104.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  105.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  106. </beans><?xml version="1.0" encoding="UTF-8"?>
  107. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  108.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  109.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  110.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  111.        http://jsf.jd.com/schema/jsf
  112.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  113.        default-lazy-init="false" default-autowire="byName">
  114.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  115.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  116. </beans>return list;
  117. <?xml version="1.0" encoding="UTF-8"?>
  118. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  119.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  120.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  121.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  122.        http://jsf.jd.com/schema/jsf
  123.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  124.        default-lazy-init="false" default-autowire="byName">
  125.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  126.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  127. </beans>}
  128. <?xml version="1.0" encoding="UTF-8"?>
  129. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  130.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  131.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  132.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  133.        http://jsf.jd.com/schema/jsf
  134.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  135.        default-lazy-init="false" default-autowire="byName">
  136.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  137.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  138. </beans>@Autowired
  139. <?xml version="1.0" encoding="UTF-8"?>
  140. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  141.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  142.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  143.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  144.        http://jsf.jd.com/schema/jsf
  145.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  146.        default-lazy-init="false" default-autowire="byName">
  147.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  148.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  149. </beans>public void setSkuInfoQueryService(SkuInfoQueryService skuInfoQueryService) {
  150. <?xml version="1.0" encoding="UTF-8"?>
  151. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  152.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  153.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  154.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  155.        http://jsf.jd.com/schema/jsf
  156.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  157.        default-lazy-init="false" default-autowire="byName">
  158.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  159.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  160. </beans><?xml version="1.0" encoding="UTF-8"?>
  161. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  162.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  163.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  164.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  165.        http://jsf.jd.com/schema/jsf
  166.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  167.        default-lazy-init="false" default-autowire="byName">
  168.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  169.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  170. </beans>this.skuInfoQueryService = skuInfoQueryService;
  171. <?xml version="1.0" encoding="UTF-8"?>
  172. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  173.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  174.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  175.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  176.        http://jsf.jd.com/schema/jsf
  177.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  178.        default-lazy-init="false" default-autowire="byName">
  179.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  180.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  181. </beans>}
  182. }
复制代码
这个实现类会依赖主数据的jsf服务SkuQueryService,SkuInfoQueryService对SkuQueryService进行rpc封装调用。通过Autowired的方式注入进来,消费者需要定义在xml文件中,这个跟我们通常引入jsf消费者是一样的。示例如下:jx/spring-jsf-consumer.xml
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  4.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  5.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  6.        http://jsf.jd.com/schema/jsf
  7.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  8.        default-lazy-init="false" default-autowire="byName">
  9.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  10.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  11. </beans>
复制代码
jar包的使用方可以直接加载consumer资源文件,也可以依赖得服务直接手动加到工程目录下。第一种方式更加方便,但是容易引起冲突,第二种方式虽然麻烦,但能够避免冲突。
2.2.2 扩展点的测试

因为扩展点依赖杰夫的关系,所以需要在配置文件中添加注册中心的配置和依赖服务的相关配置。示例如下:application-config.properties
  1. jsf.consumer.masterdata.alias=wms6-test
  2. jsf.registry.index=i.jsf.jd.com
复制代码
通过在单元测试中加载consumer资源文件和配置文件把相关的依赖都加载进来,就能够实现对接口的贯穿调用测试。如下代码所示:
  1. package com.zhongyouex.wms.spi.inventory;import com.alibaba.fastjson.JSON;import com.jdwl.wms.inventory.spi.difference.entity.ProfitLossBatchDetailExt;import com.zhongyouex.wms.spi.inventory.service.SkuInfoQueryService;import org.junit.Before;import org.junit.Ignore;import org.junit.Test;import org.junit.runner.RunWith;import org.mockito.MockitoAnnotations;import org.springframework.boot.autoconfigure.EnableAutoConfiguration;import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;import org.springframework.context.annotation.ComponentScan;import org.springframework.context.annotation.PropertySource;import org.springframework.test.context.ContextConfiguration;import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;import javax.annotation.Resource;import java.util.ArrayList;import java.util.List;@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration({"classpath:jx/spring-jsf-consumer.xml"})@PropertySource(value = {"classpath:application-config.properties"})@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})@ComponentScan(basePackages = {"com.zhongyouex.wms"})public class ProfitLossEnrichExtImplTest {<?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  4.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  5.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  6.        http://jsf.jd.com/schema/jsf
  7.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  8.        default-lazy-init="false" default-autowire="byName">
  9.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  10.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  11. </beans>@Resource<?xml version="1.0" encoding="UTF-8"?>
  12. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  13.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  14.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  15.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  16.        http://jsf.jd.com/schema/jsf
  17.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  18.        default-lazy-init="false" default-autowire="byName">
  19.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  20.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  21. </beans>SkuInfoQueryService skuInfoQueryService;<?xml version="1.0" encoding="UTF-8"?>
  22. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  23.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  24.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  25.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  26.        http://jsf.jd.com/schema/jsf
  27.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  28.        default-lazy-init="false" default-autowire="byName">
  29.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  30.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  31. </beans>ProfitLossEnrichExtImpl profitLossEnrichExtImpl = new ProfitLossEnrichExtImpl();<?xml version="1.0" encoding="UTF-8"?>
  32. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  33.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  34.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  35.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  36.        http://jsf.jd.com/schema/jsf
  37.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  38.        default-lazy-init="false" default-autowire="byName">
  39.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  40.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  41. </beans>@Before<?xml version="1.0" encoding="UTF-8"?>
  42. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  43.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  44.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  45.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  46.        http://jsf.jd.com/schema/jsf
  47.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  48.        default-lazy-init="false" default-autowire="byName">
  49.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  50.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  51. </beans>public void setUp() {<?xml version="1.0" encoding="UTF-8"?>
  52. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  53.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  54.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  55.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  56.        http://jsf.jd.com/schema/jsf
  57.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  58.        default-lazy-init="false" default-autowire="byName">
  59.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  60.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  61. </beans><?xml version="1.0" encoding="UTF-8"?>
  62. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  63.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  64.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  65.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  66.        http://jsf.jd.com/schema/jsf
  67.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  68.        default-lazy-init="false" default-autowire="byName">
  69.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  70.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  71. </beans>MockitoAnnotations.initMocks(this);<?xml version="1.0" encoding="UTF-8"?>
  72. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  73.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  74.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  75.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  76.        http://jsf.jd.com/schema/jsf
  77.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  78.        default-lazy-init="false" default-autowire="byName">
  79.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  80.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  81. </beans>}<?xml version="1.0" encoding="UTF-8"?>
  82. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  83.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  84.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  85.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  86.        http://jsf.jd.com/schema/jsf
  87.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  88.        default-lazy-init="false" default-autowire="byName">
  89.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  90.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  91. </beans>@Test<?xml version="1.0" encoding="UTF-8"?>
  92. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  93.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  94.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  95.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  96.        http://jsf.jd.com/schema/jsf
  97.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  98.        default-lazy-init="false" default-autowire="byName">
  99.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  100.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  101. </beans>public void testEnrich() throws Exception {<?xml version="1.0" encoding="UTF-8"?>
  102. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  103.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  104.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  105.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  106.        http://jsf.jd.com/schema/jsf
  107.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  108.        default-lazy-init="false" default-autowire="byName">
  109.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  110.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  111. </beans><?xml version="1.0" encoding="UTF-8"?>
  112. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  113.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  114.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  115.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  116.        http://jsf.jd.com/schema/jsf
  117.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  118.        default-lazy-init="false" default-autowire="byName">
  119.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  120.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  121. </beans>profitLossEnrichExtImpl.setSkuInfoQueryService(skuInfoQueryService);<?xml version="1.0" encoding="UTF-8"?>
  122. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  123.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  124.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  125.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  126.        http://jsf.jd.com/schema/jsf
  127.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  128.        default-lazy-init="false" default-autowire="byName">
  129.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  130.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  131. </beans><?xml version="1.0" encoding="UTF-8"?>
  132. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  133.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  134.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  135.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  136.        http://jsf.jd.com/schema/jsf
  137.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  138.        default-lazy-init="false" default-autowire="byName">
  139.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  140.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  141. </beans>ProfitLossBatchDetailExt ext = new ProfitLossBatchDetailExt();<?xml version="1.0" encoding="UTF-8"?>
  142. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  143.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  144.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  145.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  146.        http://jsf.jd.com/schema/jsf
  147.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  148.        default-lazy-init="false" default-autowire="byName">
  149.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  150.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  151. </beans><?xml version="1.0" encoding="UTF-8"?>
  152. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  153.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  154.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  155.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  156.        http://jsf.jd.com/schema/jsf
  157.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  158.        default-lazy-init="false" default-autowire="byName">
  159.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  160.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  161. </beans>ext.setSku("100008483105");<?xml version="1.0" encoding="UTF-8"?>
  162. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  163.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  164.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  165.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  166.        http://jsf.jd.com/schema/jsf
  167.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  168.        default-lazy-init="false" default-autowire="byName">
  169.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  170.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  171. </beans><?xml version="1.0" encoding="UTF-8"?>
  172. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  173.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  174.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  175.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  176.        http://jsf.jd.com/schema/jsf
  177.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  178.        default-lazy-init="false" default-autowire="byName">
  179.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  180.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  181. </beans>ext.setWarehouseNo("6_6_618");<?xml version="1.0" encoding="UTF-8"?>
  182. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  183.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  184.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  185.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  186.        http://jsf.jd.com/schema/jsf
  187.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  188.        default-lazy-init="false" default-autowire="byName">
  189.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  190.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  191. </beans><?xml version="1.0" encoding="UTF-8"?>
  192. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  193.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  194.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  195.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  196.        http://jsf.jd.com/schema/jsf
  197.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  198.        default-lazy-init="false" default-autowire="byName">
  199.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  200.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  201. </beans>ProfitLossBatchDetailExt ext1 = new ProfitLossBatchDetailExt();<?xml version="1.0" encoding="UTF-8"?>
  202. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  203.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  204.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  205.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  206.        http://jsf.jd.com/schema/jsf
  207.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  208.        default-lazy-init="false" default-autowire="byName">
  209.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  210.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  211. </beans><?xml version="1.0" encoding="UTF-8"?>
  212. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  213.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  214.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  215.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  216.        http://jsf.jd.com/schema/jsf
  217.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  218.        default-lazy-init="false" default-autowire="byName">
  219.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  220.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  221. </beans>ext1.setSku("100009847591");<?xml version="1.0" encoding="UTF-8"?>
  222. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  223.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  224.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  225.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  226.        http://jsf.jd.com/schema/jsf
  227.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  228.        default-lazy-init="false" default-autowire="byName">
  229.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  230.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  231. </beans><?xml version="1.0" encoding="UTF-8"?>
  232. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  233.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  234.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  235.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  236.        http://jsf.jd.com/schema/jsf
  237.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  238.        default-lazy-init="false" default-autowire="byName">
  239.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  240.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  241. </beans>ext1.setWarehouseNo("6_6_618");<?xml version="1.0" encoding="UTF-8"?>
  242. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  243.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  244.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  245.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  246.        http://jsf.jd.com/schema/jsf
  247.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  248.        default-lazy-init="false" default-autowire="byName">
  249.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  250.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  251. </beans><?xml version="1.0" encoding="UTF-8"?>
  252. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  253.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  254.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  255.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  256.        http://jsf.jd.com/schema/jsf
  257.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  258.        default-lazy-init="false" default-autowire="byName">
  259.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  260.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  261. </beans>List list = new ArrayList();<?xml version="1.0" encoding="UTF-8"?>
  262. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  263.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  264.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  265.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  266.        http://jsf.jd.com/schema/jsf
  267.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  268.        default-lazy-init="false" default-autowire="byName">
  269.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  270.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  271. </beans><?xml version="1.0" encoding="UTF-8"?>
  272. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  273.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  274.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  275.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  276.        http://jsf.jd.com/schema/jsf
  277.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  278.        default-lazy-init="false" default-autowire="byName">
  279.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  280.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  281. </beans>list.add(ext);<?xml version="1.0" encoding="UTF-8"?>
  282. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  283.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  284.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  285.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  286.        http://jsf.jd.com/schema/jsf
  287.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  288.        default-lazy-init="false" default-autowire="byName">
  289.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  290.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  291. </beans><?xml version="1.0" encoding="UTF-8"?>
  292. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  293.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  294.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  295.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  296.        http://jsf.jd.com/schema/jsf
  297.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  298.        default-lazy-init="false" default-autowire="byName">
  299.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  300.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  301. </beans>list.add(ext1);<?xml version="1.0" encoding="UTF-8"?>
  302. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  303.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  304.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  305.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  306.        http://jsf.jd.com/schema/jsf
  307.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  308.        default-lazy-init="false" default-autowire="byName">
  309.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  310.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  311. </beans><?xml version="1.0" encoding="UTF-8"?>
  312. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  313.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  314.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  315.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  316.        http://jsf.jd.com/schema/jsf
  317.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  318.        default-lazy-init="false" default-autowire="byName">
  319.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  320.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  321. </beans>profitLossEnrichExtImpl.enrich(list);<?xml version="1.0" encoding="UTF-8"?>
  322. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  323.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  324.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  325.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  326.        http://jsf.jd.com/schema/jsf
  327.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  328.        default-lazy-init="false" default-autowire="byName">
  329.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  330.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  331. </beans><?xml version="1.0" encoding="UTF-8"?>
  332. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  333.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  334.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  335.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  336.        http://jsf.jd.com/schema/jsf
  337.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  338.        default-lazy-init="false" default-autowire="byName">
  339.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  340.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  341. </beans>System.out.write(JSON.toJSONBytes(list));<?xml version="1.0" encoding="UTF-8"?>
  342. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  343.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  344.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  345.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  346.        http://jsf.jd.com/schema/jsf
  347.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  348.        default-lazy-init="false" default-autowire="byName">
  349.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  350.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  351. </beans>}}//Generated with love by TestMe :) Please report issues and submit feature requests at: http://weirddev.com/forum#!/testme
复制代码
2.3 jsf接口方式

jsf方式的扩展点实现和jar包方式是一样的,区别是这种方式不需要依赖服务提供方实现的jar,无需加载具体的实现类。通过配置jsf接口的杰夫别名来识别扩展点并进行扩展点的调用。
3 SPI原理分析

3.1dddplus

dddplus-runtime包中ExtensionDef主要是用来加载扩展点bean到InternalIndexer:
  1. public void prepare(@NotNull Object bean) {<?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  4.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  5.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  6.        http://jsf.jd.com/schema/jsf
  7.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  8.        default-lazy-init="false" default-autowire="byName">
  9.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  10.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  11. </beans>this.initialize(bean);<?xml version="1.0" encoding="UTF-8"?>
  12. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  13.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  14.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  15.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  16.        http://jsf.jd.com/schema/jsf
  17.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  18.        default-lazy-init="false" default-autowire="byName">
  19.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  20.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  21. </beans>InternalIndexer.prepare(this);}private void initialize(Object bean) {<?xml version="1.0" encoding="UTF-8"?>
  22. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  23.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  24.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  25.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  26.        http://jsf.jd.com/schema/jsf
  27.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  28.        default-lazy-init="false" default-autowire="byName">
  29.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  30.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  31. </beans>Extension extension = (Extension)InternalAopUtils.getAnnotation(bean, Extension.class);<?xml version="1.0" encoding="UTF-8"?>
  32. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  33.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  34.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  35.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  36.        http://jsf.jd.com/schema/jsf
  37.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  38.        default-lazy-init="false" default-autowire="byName">
  39.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  40.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  41. </beans>this.code = extension.code();<?xml version="1.0" encoding="UTF-8"?>
  42. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  43.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  44.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  45.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  46.        http://jsf.jd.com/schema/jsf
  47.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  48.        default-lazy-init="false" default-autowire="byName">
  49.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  50.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  51. </beans>this.name = extension.name();<?xml version="1.0" encoding="UTF-8"?>
  52. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  53.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  54.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  55.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  56.        http://jsf.jd.com/schema/jsf
  57.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  58.        default-lazy-init="false" default-autowire="byName">
  59.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  60.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  61. </beans>if (!(bean instanceof IDomainExtension)) {<?xml version="1.0" encoding="UTF-8"?>
  62. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  63.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  64.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  65.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  66.        http://jsf.jd.com/schema/jsf
  67.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  68.        default-lazy-init="false" default-autowire="byName">
  69.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  70.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  71. </beans><?xml version="1.0" encoding="UTF-8"?>
  72. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  73.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  74.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  75.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  76.        http://jsf.jd.com/schema/jsf
  77.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  78.        default-lazy-init="false" default-autowire="byName">
  79.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  80.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  81. </beans>throw BootstrapException.ofMessage(new String[]{bean.getClass().getCanonicalName(), " MUST implement IDomainExtension"});<?xml version="1.0" encoding="UTF-8"?>
  82. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  83.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  84.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  85.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  86.        http://jsf.jd.com/schema/jsf
  87.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  88.        default-lazy-init="false" default-autowire="byName">
  89.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  90.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  91. </beans>} else {<?xml version="1.0" encoding="UTF-8"?>
  92. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  93.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  94.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  95.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  96.        http://jsf.jd.com/schema/jsf
  97.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  98.        default-lazy-init="false" default-autowire="byName">
  99.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  100.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  101. </beans><?xml version="1.0" encoding="UTF-8"?>
  102. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  103.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  104.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  105.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  106.        http://jsf.jd.com/schema/jsf
  107.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  108.        default-lazy-init="false" default-autowire="byName">
  109.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  110.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  111. </beans>this.extensionBean = (IDomainExtension)bean;<?xml version="1.0" encoding="UTF-8"?>
  112. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  113.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  114.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  115.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  116.        http://jsf.jd.com/schema/jsf
  117.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  118.        default-lazy-init="false" default-autowire="byName">
  119.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  120.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  121. </beans><?xml version="1.0" encoding="UTF-8"?>
  122. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  123.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  124.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  125.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  126.        http://jsf.jd.com/schema/jsf
  127.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  128.        default-lazy-init="false" default-autowire="byName">
  129.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  130.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  131. </beans>Class[] var3 = InternalAopUtils.getTarget(this.extensionBean).getClass().getInterfaces();<?xml version="1.0" encoding="UTF-8"?>
  132. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  133.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  134.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  135.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  136.        http://jsf.jd.com/schema/jsf
  137.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  138.        default-lazy-init="false" default-autowire="byName">
  139.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  140.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  141. </beans><?xml version="1.0" encoding="UTF-8"?>
  142. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  143.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  144.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  145.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  146.        http://jsf.jd.com/schema/jsf
  147.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  148.        default-lazy-init="false" default-autowire="byName">
  149.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  150.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  151. </beans>int var4 = var3.length;<?xml version="1.0" encoding="UTF-8"?>
  152. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  153.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  154.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  155.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  156.        http://jsf.jd.com/schema/jsf
  157.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  158.        default-lazy-init="false" default-autowire="byName">
  159.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  160.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  161. </beans><?xml version="1.0" encoding="UTF-8"?>
  162. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  163.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  164.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  165.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  166.        http://jsf.jd.com/schema/jsf
  167.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  168.        default-lazy-init="false" default-autowire="byName">
  169.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  170.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  171. </beans>for(int var5 = 0; var5 < var4; ++var5) {<?xml version="1.0" encoding="UTF-8"?>
  172. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  173.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  174.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  175.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  176.        http://jsf.jd.com/schema/jsf
  177.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  178.        default-lazy-init="false" default-autowire="byName">
  179.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  180.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  181. </beans><?xml version="1.0" encoding="UTF-8"?>
  182. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  183.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  184.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  185.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  186.        http://jsf.jd.com/schema/jsf
  187.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  188.        default-lazy-init="false" default-autowire="byName">
  189.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  190.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  191. </beans><?xml version="1.0" encoding="UTF-8"?>
  192. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  193.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  194.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  195.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  196.        http://jsf.jd.com/schema/jsf
  197.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  198.        default-lazy-init="false" default-autowire="byName">
  199.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  200.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  201. </beans>Class extensionBeanInterfaceClazz = var3[var5];<?xml version="1.0" encoding="UTF-8"?>
  202. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  203.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  204.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  205.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  206.        http://jsf.jd.com/schema/jsf
  207.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  208.        default-lazy-init="false" default-autowire="byName">
  209.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  210.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  211. </beans><?xml version="1.0" encoding="UTF-8"?>
  212. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  213.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  214.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  215.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  216.        http://jsf.jd.com/schema/jsf
  217.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  218.        default-lazy-init="false" default-autowire="byName">
  219.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  220.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  221. </beans><?xml version="1.0" encoding="UTF-8"?>
  222. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  223.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  224.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  225.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  226.        http://jsf.jd.com/schema/jsf
  227.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  228.        default-lazy-init="false" default-autowire="byName">
  229.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  230.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  231. </beans>if (extensionBeanInterfaceClazz.isInstance(this.extensionBean)) {<?xml version="1.0" encoding="UTF-8"?>
  232. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  233.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  234.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  235.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  236.        http://jsf.jd.com/schema/jsf
  237.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  238.        default-lazy-init="false" default-autowire="byName">
  239.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  240.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  241. </beans><?xml version="1.0" encoding="UTF-8"?>
  242. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  243.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  244.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  245.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  246.        http://jsf.jd.com/schema/jsf
  247.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  248.        default-lazy-init="false" default-autowire="byName">
  249.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  250.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  251. </beans><?xml version="1.0" encoding="UTF-8"?>
  252. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  253.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  254.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  255.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  256.        http://jsf.jd.com/schema/jsf
  257.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  258.        default-lazy-init="false" default-autowire="byName">
  259.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  260.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  261. </beans><?xml version="1.0" encoding="UTF-8"?>
  262. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  263.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  264.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  265.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  266.        http://jsf.jd.com/schema/jsf
  267.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  268.        default-lazy-init="false" default-autowire="byName">
  269.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  270.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  271. </beans>this.extClazz = extensionBeanInterfaceClazz;<?xml version="1.0" encoding="UTF-8"?>
  272. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  273.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  274.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  275.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  276.        http://jsf.jd.com/schema/jsf
  277.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  278.        default-lazy-init="false" default-autowire="byName">
  279.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  280.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  281. </beans><?xml version="1.0" encoding="UTF-8"?>
  282. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  283.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  284.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  285.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  286.        http://jsf.jd.com/schema/jsf
  287.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  288.        default-lazy-init="false" default-autowire="byName">
  289.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  290.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  291. </beans><?xml version="1.0" encoding="UTF-8"?>
  292. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  293.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  294.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  295.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  296.        http://jsf.jd.com/schema/jsf
  297.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  298.        default-lazy-init="false" default-autowire="byName">
  299.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  300.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  301. </beans><?xml version="1.0" encoding="UTF-8"?>
  302. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  303.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  304.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  305.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  306.        http://jsf.jd.com/schema/jsf
  307.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  308.        default-lazy-init="false" default-autowire="byName">
  309.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  310.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  311. </beans>log.debug("{} has ext instance:{}", this.extClazz.getCanonicalName(), this);<?xml version="1.0" encoding="UTF-8"?>
  312. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  313.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  314.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  315.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  316.        http://jsf.jd.com/schema/jsf
  317.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  318.        default-lazy-init="false" default-autowire="byName">
  319.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  320.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  321. </beans><?xml version="1.0" encoding="UTF-8"?>
  322. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  323.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  324.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  325.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  326.        http://jsf.jd.com/schema/jsf
  327.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  328.        default-lazy-init="false" default-autowire="byName">
  329.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  330.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  331. </beans><?xml version="1.0" encoding="UTF-8"?>
  332. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  333.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  334.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  335.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  336.        http://jsf.jd.com/schema/jsf
  337.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  338.        default-lazy-init="false" default-autowire="byName">
  339.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  340.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  341. </beans><?xml version="1.0" encoding="UTF-8"?>
  342. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  343.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  344.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  345.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  346.        http://jsf.jd.com/schema/jsf
  347.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  348.        default-lazy-init="false" default-autowire="byName">
  349.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  350.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  351. </beans>break;<?xml version="1.0" encoding="UTF-8"?>
  352. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  353.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  354.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  355.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  356.        http://jsf.jd.com/schema/jsf
  357.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  358.        default-lazy-init="false" default-autowire="byName">
  359.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  360.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  361. </beans><?xml version="1.0" encoding="UTF-8"?>
  362. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  363.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  364.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  365.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  366.        http://jsf.jd.com/schema/jsf
  367.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  368.        default-lazy-init="false" default-autowire="byName">
  369.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  370.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  371. </beans><?xml version="1.0" encoding="UTF-8"?>
  372. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  373.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  374.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  375.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  376.        http://jsf.jd.com/schema/jsf
  377.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  378.        default-lazy-init="false" default-autowire="byName">
  379.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  380.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  381. </beans>}<?xml version="1.0" encoding="UTF-8"?>
  382. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  383.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  384.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  385.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  386.        http://jsf.jd.com/schema/jsf
  387.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  388.        default-lazy-init="false" default-autowire="byName">
  389.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  390.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  391. </beans><?xml version="1.0" encoding="UTF-8"?>
  392. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  393.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  394.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  395.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  396.        http://jsf.jd.com/schema/jsf
  397.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  398.        default-lazy-init="false" default-autowire="byName">
  399.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  400.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  401. </beans>}<?xml version="1.0" encoding="UTF-8"?>
  402. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  403.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  404.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  405.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  406.        http://jsf.jd.com/schema/jsf
  407.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  408.        default-lazy-init="false" default-autowire="byName">
  409.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  410.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  411. </beans>}}
复制代码
3.2 java spi

通过上面简单的demo,可以看到最关键的实现就是ServiceLoader这个类,可以看下这个类的源码,如下:
  1. public final class ServiceLoader implements Iterable { 2 3 4<?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  4.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  5.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  6.        http://jsf.jd.com/schema/jsf
  7.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  8.        default-lazy-init="false" default-autowire="byName">
  9.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  10.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  11. </beans> //扫描目录前缀 5<?xml version="1.0" encoding="UTF-8"?>
  12. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  13.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  14.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  15.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  16.        http://jsf.jd.com/schema/jsf
  17.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  18.        default-lazy-init="false" default-autowire="byName">
  19.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  20.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  21. </beans> private static final String PREFIX = "META-INF/services/"; 6 7<?xml version="1.0" encoding="UTF-8"?>
  22. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  23.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  24.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  25.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  26.        http://jsf.jd.com/schema/jsf
  27.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  28.        default-lazy-init="false" default-autowire="byName">
  29.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  30.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  31. </beans> // 被加载的类或接口 8<?xml version="1.0" encoding="UTF-8"?>
  32. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  33.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  34.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  35.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  36.        http://jsf.jd.com/schema/jsf
  37.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  38.        default-lazy-init="false" default-autowire="byName">
  39.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  40.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  41. </beans> private final Class service; 910<?xml version="1.0" encoding="UTF-8"?>
  42. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  43.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  44.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  45.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  46.        http://jsf.jd.com/schema/jsf
  47.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  48.        default-lazy-init="false" default-autowire="byName">
  49.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  50.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  51. </beans> // 用于定位、加载和实例化实现方实现的类的类加载器11<?xml version="1.0" encoding="UTF-8"?>
  52. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  53.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  54.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  55.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  56.        http://jsf.jd.com/schema/jsf
  57.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  58.        default-lazy-init="false" default-autowire="byName">
  59.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  60.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  61. </beans> private final ClassLoader loader;1213<?xml version="1.0" encoding="UTF-8"?>
  62. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  63.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  64.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  65.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  66.        http://jsf.jd.com/schema/jsf
  67.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  68.        default-lazy-init="false" default-autowire="byName">
  69.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  70.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  71. </beans> // 上下文对象14<?xml version="1.0" encoding="UTF-8"?>
  72. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  73.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  74.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  75.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  76.        http://jsf.jd.com/schema/jsf
  77.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  78.        default-lazy-init="false" default-autowire="byName">
  79.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  80.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  81. </beans> private final AccessControlContext acc;1516<?xml version="1.0" encoding="UTF-8"?>
  82. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  83.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  84.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  85.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  86.        http://jsf.jd.com/schema/jsf
  87.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  88.        default-lazy-init="false" default-autowire="byName">
  89.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  90.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  91. </beans> // 按照实例化的顺序缓存已经实例化的类17<?xml version="1.0" encoding="UTF-8"?>
  92. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  93.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  94.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  95.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  96.        http://jsf.jd.com/schema/jsf
  97.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  98.        default-lazy-init="false" default-autowire="byName">
  99.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  100.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  101. </beans> private LinkedHashMap providers = new LinkedHashMap();1819<?xml version="1.0" encoding="UTF-8"?>
  102. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  103.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  104.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  105.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  106.        http://jsf.jd.com/schema/jsf
  107.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  108.        default-lazy-init="false" default-autowire="byName">
  109.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  110.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  111. </beans> // 懒查找迭代器20<?xml version="1.0" encoding="UTF-8"?>
  112. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  113.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  114.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  115.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  116.        http://jsf.jd.com/schema/jsf
  117.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  118.        default-lazy-init="false" default-autowire="byName">
  119.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  120.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  121. </beans> private java.util.ServiceLoader.LazyIterator lookupIterator;2122<?xml version="1.0" encoding="UTF-8"?>
  122. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  123.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  124.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  125.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  126.        http://jsf.jd.com/schema/jsf
  127.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  128.        default-lazy-init="false" default-autowire="byName">
  129.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  130.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  131. </beans> // 私有内部类,提供对所有的service的类的加载与实例化23<?xml version="1.0" encoding="UTF-8"?>
  132. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  133.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  134.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  135.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  136.        http://jsf.jd.com/schema/jsf
  137.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  138.        default-lazy-init="false" default-autowire="byName">
  139.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  140.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  141. </beans> private class LazyIterator implements Iterator {24<?xml version="1.0" encoding="UTF-8"?>
  142. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  143.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  144.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  145.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  146.        http://jsf.jd.com/schema/jsf
  147.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  148.        default-lazy-init="false" default-autowire="byName">
  149.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  150.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  151. </beans><?xml version="1.0" encoding="UTF-8"?>
  152. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  153.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  154.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  155.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  156.        http://jsf.jd.com/schema/jsf
  157.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  158.        default-lazy-init="false" default-autowire="byName">
  159.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  160.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  161. </beans> Class service;25<?xml version="1.0" encoding="UTF-8"?>
  162. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  163.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  164.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  165.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  166.        http://jsf.jd.com/schema/jsf
  167.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  168.        default-lazy-init="false" default-autowire="byName">
  169.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  170.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  171. </beans><?xml version="1.0" encoding="UTF-8"?>
  172. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  173.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  174.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  175.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  176.        http://jsf.jd.com/schema/jsf
  177.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  178.        default-lazy-init="false" default-autowire="byName">
  179.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  180.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  181. </beans> ClassLoader loader;26<?xml version="1.0" encoding="UTF-8"?>
  182. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  183.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  184.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  185.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  186.        http://jsf.jd.com/schema/jsf
  187.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  188.        default-lazy-init="false" default-autowire="byName">
  189.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  190.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  191. </beans><?xml version="1.0" encoding="UTF-8"?>
  192. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  193.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  194.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  195.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  196.        http://jsf.jd.com/schema/jsf
  197.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  198.        default-lazy-init="false" default-autowire="byName">
  199.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  200.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  201. </beans> Enumeration configs = null;27<?xml version="1.0" encoding="UTF-8"?>
  202. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  203.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  204.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  205.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  206.        http://jsf.jd.com/schema/jsf
  207.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  208.        default-lazy-init="false" default-autowire="byName">
  209.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  210.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  211. </beans><?xml version="1.0" encoding="UTF-8"?>
  212. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  213.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  214.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  215.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  216.        http://jsf.jd.com/schema/jsf
  217.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  218.        default-lazy-init="false" default-autowire="byName">
  219.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  220.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  221. </beans> String nextName = null;2829<?xml version="1.0" encoding="UTF-8"?>
  222. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  223.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  224.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  225.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  226.        http://jsf.jd.com/schema/jsf
  227.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  228.        default-lazy-init="false" default-autowire="byName">
  229.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  230.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  231. </beans><?xml version="1.0" encoding="UTF-8"?>
  232. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  233.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  234.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  235.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  236.        http://jsf.jd.com/schema/jsf
  237.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  238.        default-lazy-init="false" default-autowire="byName">
  239.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  240.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  241. </beans> //...30<?xml version="1.0" encoding="UTF-8"?>
  242. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  243.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  244.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  245.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  246.        http://jsf.jd.com/schema/jsf
  247.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  248.        default-lazy-init="false" default-autowire="byName">
  249.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  250.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  251. </beans><?xml version="1.0" encoding="UTF-8"?>
  252. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  253.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  254.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  255.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  256.        http://jsf.jd.com/schema/jsf
  257.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  258.        default-lazy-init="false" default-autowire="byName">
  259.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  260.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  261. </beans> private boolean hasNextService() {31<?xml version="1.0" encoding="UTF-8"?>
  262. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  263.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  264.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  265.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  266.        http://jsf.jd.com/schema/jsf
  267.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  268.        default-lazy-init="false" default-autowire="byName">
  269.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  270.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  271. </beans><?xml version="1.0" encoding="UTF-8"?>
  272. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  273.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  274.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  275.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  276.        http://jsf.jd.com/schema/jsf
  277.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  278.        default-lazy-init="false" default-autowire="byName">
  279.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  280.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  281. </beans><?xml version="1.0" encoding="UTF-8"?>
  282. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  283.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  284.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  285.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  286.        http://jsf.jd.com/schema/jsf
  287.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  288.        default-lazy-init="false" default-autowire="byName">
  289.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  290.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  291. </beans> if (configs == null) {32<?xml version="1.0" encoding="UTF-8"?>
  292. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  293.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  294.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  295.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  296.        http://jsf.jd.com/schema/jsf
  297.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  298.        default-lazy-init="false" default-autowire="byName">
  299.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  300.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  301. </beans><?xml version="1.0" encoding="UTF-8"?>
  302. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  303.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  304.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  305.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  306.        http://jsf.jd.com/schema/jsf
  307.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  308.        default-lazy-init="false" default-autowire="byName">
  309.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  310.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  311. </beans><?xml version="1.0" encoding="UTF-8"?>
  312. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  313.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  314.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  315.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  316.        http://jsf.jd.com/schema/jsf
  317.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  318.        default-lazy-init="false" default-autowire="byName">
  319.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  320.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  321. </beans><?xml version="1.0" encoding="UTF-8"?>
  322. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  323.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  324.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  325.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  326.        http://jsf.jd.com/schema/jsf
  327.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  328.        default-lazy-init="false" default-autowire="byName">
  329.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  330.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  331. </beans> try {33<?xml version="1.0" encoding="UTF-8"?>
  332. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  333.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  334.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  335.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  336.        http://jsf.jd.com/schema/jsf
  337.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  338.        default-lazy-init="false" default-autowire="byName">
  339.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  340.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  341. </beans><?xml version="1.0" encoding="UTF-8"?>
  342. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  343.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  344.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  345.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  346.        http://jsf.jd.com/schema/jsf
  347.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  348.        default-lazy-init="false" default-autowire="byName">
  349.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  350.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  351. </beans><?xml version="1.0" encoding="UTF-8"?>
  352. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  353.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  354.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  355.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  356.        http://jsf.jd.com/schema/jsf
  357.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  358.        default-lazy-init="false" default-autowire="byName">
  359.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  360.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  361. </beans><?xml version="1.0" encoding="UTF-8"?>
  362. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  363.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  364.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  365.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  366.        http://jsf.jd.com/schema/jsf
  367.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  368.        default-lazy-init="false" default-autowire="byName">
  369.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  370.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  371. </beans><?xml version="1.0" encoding="UTF-8"?>
  372. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  373.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  374.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  375.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  376.        http://jsf.jd.com/schema/jsf
  377.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  378.        default-lazy-init="false" default-autowire="byName">
  379.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  380.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  381. </beans> //获取目录下所有的类34<?xml version="1.0" encoding="UTF-8"?>
  382. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  383.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  384.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  385.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  386.        http://jsf.jd.com/schema/jsf
  387.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  388.        default-lazy-init="false" default-autowire="byName">
  389.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  390.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  391. </beans><?xml version="1.0" encoding="UTF-8"?>
  392. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  393.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  394.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  395.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  396.        http://jsf.jd.com/schema/jsf
  397.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  398.        default-lazy-init="false" default-autowire="byName">
  399.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  400.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  401. </beans><?xml version="1.0" encoding="UTF-8"?>
  402. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  403.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  404.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  405.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  406.        http://jsf.jd.com/schema/jsf
  407.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  408.        default-lazy-init="false" default-autowire="byName">
  409.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  410.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  411. </beans><?xml version="1.0" encoding="UTF-8"?>
  412. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  413.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  414.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  415.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  416.        http://jsf.jd.com/schema/jsf
  417.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  418.        default-lazy-init="false" default-autowire="byName">
  419.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  420.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  421. </beans><?xml version="1.0" encoding="UTF-8"?>
  422. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  423.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  424.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  425.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  426.        http://jsf.jd.com/schema/jsf
  427.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  428.        default-lazy-init="false" default-autowire="byName">
  429.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  430.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  431. </beans> String fullName = PREFIX + service.getName();35<?xml version="1.0" encoding="UTF-8"?>
  432. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  433.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  434.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  435.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  436.        http://jsf.jd.com/schema/jsf
  437.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  438.        default-lazy-init="false" default-autowire="byName">
  439.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  440.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  441. </beans><?xml version="1.0" encoding="UTF-8"?>
  442. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  443.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  444.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  445.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  446.        http://jsf.jd.com/schema/jsf
  447.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  448.        default-lazy-init="false" default-autowire="byName">
  449.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  450.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  451. </beans><?xml version="1.0" encoding="UTF-8"?>
  452. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  453.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  454.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  455.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  456.        http://jsf.jd.com/schema/jsf
  457.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  458.        default-lazy-init="false" default-autowire="byName">
  459.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  460.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  461. </beans><?xml version="1.0" encoding="UTF-8"?>
  462. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  463.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  464.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  465.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  466.        http://jsf.jd.com/schema/jsf
  467.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  468.        default-lazy-init="false" default-autowire="byName">
  469.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  470.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  471. </beans><?xml version="1.0" encoding="UTF-8"?>
  472. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  473.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  474.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  475.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  476.        http://jsf.jd.com/schema/jsf
  477.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  478.        default-lazy-init="false" default-autowire="byName">
  479.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  480.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  481. </beans> if (loader == null)36<?xml version="1.0" encoding="UTF-8"?>
  482. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  483.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  484.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  485.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  486.        http://jsf.jd.com/schema/jsf
  487.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  488.        default-lazy-init="false" default-autowire="byName">
  489.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  490.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  491. </beans><?xml version="1.0" encoding="UTF-8"?>
  492. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  493.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  494.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  495.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  496.        http://jsf.jd.com/schema/jsf
  497.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  498.        default-lazy-init="false" default-autowire="byName">
  499.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  500.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  501. </beans><?xml version="1.0" encoding="UTF-8"?>
  502. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  503.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  504.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  505.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  506.        http://jsf.jd.com/schema/jsf
  507.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  508.        default-lazy-init="false" default-autowire="byName">
  509.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  510.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  511. </beans><?xml version="1.0" encoding="UTF-8"?>
  512. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  513.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  514.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  515.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  516.        http://jsf.jd.com/schema/jsf
  517.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  518.        default-lazy-init="false" default-autowire="byName">
  519.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  520.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  521. </beans><?xml version="1.0" encoding="UTF-8"?>
  522. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  523.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  524.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  525.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  526.        http://jsf.jd.com/schema/jsf
  527.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  528.        default-lazy-init="false" default-autowire="byName">
  529.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  530.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  531. </beans><?xml version="1.0" encoding="UTF-8"?>
  532. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  533.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  534.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  535.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  536.        http://jsf.jd.com/schema/jsf
  537.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  538.        default-lazy-init="false" default-autowire="byName">
  539.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  540.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  541. </beans> configs = ClassLoader.getSystemResources(fullName);37<?xml version="1.0" encoding="UTF-8"?>
  542. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  543.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  544.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  545.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  546.        http://jsf.jd.com/schema/jsf
  547.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  548.        default-lazy-init="false" default-autowire="byName">
  549.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  550.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  551. </beans><?xml version="1.0" encoding="UTF-8"?>
  552. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  553.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  554.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  555.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  556.        http://jsf.jd.com/schema/jsf
  557.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  558.        default-lazy-init="false" default-autowire="byName">
  559.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  560.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  561. </beans><?xml version="1.0" encoding="UTF-8"?>
  562. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  563.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  564.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  565.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  566.        http://jsf.jd.com/schema/jsf
  567.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  568.        default-lazy-init="false" default-autowire="byName">
  569.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  570.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  571. </beans><?xml version="1.0" encoding="UTF-8"?>
  572. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  573.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  574.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  575.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  576.        http://jsf.jd.com/schema/jsf
  577.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  578.        default-lazy-init="false" default-autowire="byName">
  579.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  580.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  581. </beans><?xml version="1.0" encoding="UTF-8"?>
  582. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  583.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  584.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  585.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  586.        http://jsf.jd.com/schema/jsf
  587.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  588.        default-lazy-init="false" default-autowire="byName">
  589.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  590.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  591. </beans> else38<?xml version="1.0" encoding="UTF-8"?>
  592. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  593.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  594.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  595.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  596.        http://jsf.jd.com/schema/jsf
  597.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  598.        default-lazy-init="false" default-autowire="byName">
  599.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  600.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  601. </beans><?xml version="1.0" encoding="UTF-8"?>
  602. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  603.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  604.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  605.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  606.        http://jsf.jd.com/schema/jsf
  607.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  608.        default-lazy-init="false" default-autowire="byName">
  609.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  610.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  611. </beans><?xml version="1.0" encoding="UTF-8"?>
  612. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  613.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  614.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  615.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  616.        http://jsf.jd.com/schema/jsf
  617.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  618.        default-lazy-init="false" default-autowire="byName">
  619.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  620.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  621. </beans><?xml version="1.0" encoding="UTF-8"?>
  622. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  623.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  624.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  625.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  626.        http://jsf.jd.com/schema/jsf
  627.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  628.        default-lazy-init="false" default-autowire="byName">
  629.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  630.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  631. </beans><?xml version="1.0" encoding="UTF-8"?>
  632. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  633.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  634.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  635.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  636.        http://jsf.jd.com/schema/jsf
  637.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  638.        default-lazy-init="false" default-autowire="byName">
  639.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  640.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  641. </beans><?xml version="1.0" encoding="UTF-8"?>
  642. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  643.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  644.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  645.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  646.        http://jsf.jd.com/schema/jsf
  647.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  648.        default-lazy-init="false" default-autowire="byName">
  649.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  650.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  651. </beans> configs = loader.getResources(fullName);39<?xml version="1.0" encoding="UTF-8"?>
  652. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  653.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  654.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  655.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  656.        http://jsf.jd.com/schema/jsf
  657.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  658.        default-lazy-init="false" default-autowire="byName">
  659.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  660.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  661. </beans><?xml version="1.0" encoding="UTF-8"?>
  662. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  663.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  664.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  665.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  666.        http://jsf.jd.com/schema/jsf
  667.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  668.        default-lazy-init="false" default-autowire="byName">
  669.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  670.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  671. </beans><?xml version="1.0" encoding="UTF-8"?>
  672. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  673.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  674.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  675.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  676.        http://jsf.jd.com/schema/jsf
  677.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  678.        default-lazy-init="false" default-autowire="byName">
  679.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  680.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  681. </beans><?xml version="1.0" encoding="UTF-8"?>
  682. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  683.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  684.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  685.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  686.        http://jsf.jd.com/schema/jsf
  687.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  688.        default-lazy-init="false" default-autowire="byName">
  689.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  690.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  691. </beans> } catch (IOException x) {40<?xml version="1.0" encoding="UTF-8"?>
  692. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  693.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  694.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  695.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  696.        http://jsf.jd.com/schema/jsf
  697.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  698.        default-lazy-init="false" default-autowire="byName">
  699.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  700.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  701. </beans><?xml version="1.0" encoding="UTF-8"?>
  702. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  703.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  704.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  705.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  706.        http://jsf.jd.com/schema/jsf
  707.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  708.        default-lazy-init="false" default-autowire="byName">
  709.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  710.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  711. </beans><?xml version="1.0" encoding="UTF-8"?>
  712. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  713.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  714.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  715.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  716.        http://jsf.jd.com/schema/jsf
  717.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  718.        default-lazy-init="false" default-autowire="byName">
  719.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  720.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  721. </beans><?xml version="1.0" encoding="UTF-8"?>
  722. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  723.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  724.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  725.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  726.        http://jsf.jd.com/schema/jsf
  727.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  728.        default-lazy-init="false" default-autowire="byName">
  729.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  730.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  731. </beans><?xml version="1.0" encoding="UTF-8"?>
  732. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  733.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  734.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  735.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  736.        http://jsf.jd.com/schema/jsf
  737.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  738.        default-lazy-init="false" default-autowire="byName">
  739.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  740.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  741. </beans> //...41<?xml version="1.0" encoding="UTF-8"?>
  742. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  743.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  744.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  745.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  746.        http://jsf.jd.com/schema/jsf
  747.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  748.        default-lazy-init="false" default-autowire="byName">
  749.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  750.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  751. </beans><?xml version="1.0" encoding="UTF-8"?>
  752. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  753.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  754.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  755.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  756.        http://jsf.jd.com/schema/jsf
  757.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  758.        default-lazy-init="false" default-autowire="byName">
  759.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  760.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  761. </beans><?xml version="1.0" encoding="UTF-8"?>
  762. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  763.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  764.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  765.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  766.        http://jsf.jd.com/schema/jsf
  767.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  768.        default-lazy-init="false" default-autowire="byName">
  769.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  770.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  771. </beans><?xml version="1.0" encoding="UTF-8"?>
  772. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  773.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  774.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  775.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  776.        http://jsf.jd.com/schema/jsf
  777.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  778.        default-lazy-init="false" default-autowire="byName">
  779.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  780.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  781. </beans> }42<?xml version="1.0" encoding="UTF-8"?>
  782. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  783.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  784.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  785.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  786.        http://jsf.jd.com/schema/jsf
  787.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  788.        default-lazy-init="false" default-autowire="byName">
  789.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  790.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  791. </beans><?xml version="1.0" encoding="UTF-8"?>
  792. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  793.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  794.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  795.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  796.        http://jsf.jd.com/schema/jsf
  797.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  798.        default-lazy-init="false" default-autowire="byName">
  799.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  800.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  801. </beans><?xml version="1.0" encoding="UTF-8"?>
  802. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  803.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  804.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  805.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  806.        http://jsf.jd.com/schema/jsf
  807.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  808.        default-lazy-init="false" default-autowire="byName">
  809.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  810.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  811. </beans><?xml version="1.0" encoding="UTF-8"?>
  812. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  813.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  814.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  815.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  816.        http://jsf.jd.com/schema/jsf
  817.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  818.        default-lazy-init="false" default-autowire="byName">
  819.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  820.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  821. </beans> //....43<?xml version="1.0" encoding="UTF-8"?>
  822. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  823.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  824.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  825.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  826.        http://jsf.jd.com/schema/jsf
  827.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  828.        default-lazy-init="false" default-autowire="byName">
  829.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  830.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  831. </beans><?xml version="1.0" encoding="UTF-8"?>
  832. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  833.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  834.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  835.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  836.        http://jsf.jd.com/schema/jsf
  837.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  838.        default-lazy-init="false" default-autowire="byName">
  839.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  840.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  841. </beans><?xml version="1.0" encoding="UTF-8"?>
  842. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  843.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  844.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  845.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  846.        http://jsf.jd.com/schema/jsf
  847.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  848.        default-lazy-init="false" default-autowire="byName">
  849.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  850.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  851. </beans> }44<?xml version="1.0" encoding="UTF-8"?>
  852. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  853.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  854.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  855.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  856.        http://jsf.jd.com/schema/jsf
  857.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  858.        default-lazy-init="false" default-autowire="byName">
  859.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  860.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  861. </beans><?xml version="1.0" encoding="UTF-8"?>
  862. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  863.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  864.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  865.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  866.        http://jsf.jd.com/schema/jsf
  867.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  868.        default-lazy-init="false" default-autowire="byName">
  869.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  870.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  871. </beans> }4546<?xml version="1.0" encoding="UTF-8"?>
  872. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  873.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  874.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  875.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  876.        http://jsf.jd.com/schema/jsf
  877.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  878.        default-lazy-init="false" default-autowire="byName">
  879.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  880.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  881. </beans><?xml version="1.0" encoding="UTF-8"?>
  882. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  883.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  884.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  885.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  886.        http://jsf.jd.com/schema/jsf
  887.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  888.        default-lazy-init="false" default-autowire="byName">
  889.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  890.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  891. </beans> private S nextService() {47<?xml version="1.0" encoding="UTF-8"?>
  892. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  893.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  894.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  895.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  896.        http://jsf.jd.com/schema/jsf
  897.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  898.        default-lazy-init="false" default-autowire="byName">
  899.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  900.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  901. </beans><?xml version="1.0" encoding="UTF-8"?>
  902. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  903.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  904.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  905.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  906.        http://jsf.jd.com/schema/jsf
  907.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  908.        default-lazy-init="false" default-autowire="byName">
  909.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  910.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  911. </beans><?xml version="1.0" encoding="UTF-8"?>
  912. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  913.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  914.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  915.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  916.        http://jsf.jd.com/schema/jsf
  917.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  918.        default-lazy-init="false" default-autowire="byName">
  919.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  920.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  921. </beans> String cn = nextName;48<?xml version="1.0" encoding="UTF-8"?>
  922. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  923.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  924.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  925.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  926.        http://jsf.jd.com/schema/jsf
  927.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  928.        default-lazy-init="false" default-autowire="byName">
  929.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  930.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  931. </beans><?xml version="1.0" encoding="UTF-8"?>
  932. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  933.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  934.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  935.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  936.        http://jsf.jd.com/schema/jsf
  937.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  938.        default-lazy-init="false" default-autowire="byName">
  939.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  940.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  941. </beans><?xml version="1.0" encoding="UTF-8"?>
  942. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  943.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  944.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  945.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  946.        http://jsf.jd.com/schema/jsf
  947.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  948.        default-lazy-init="false" default-autowire="byName">
  949.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  950.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  951. </beans> nextName = null;49<?xml version="1.0" encoding="UTF-8"?>
  952. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  953.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  954.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  955.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  956.        http://jsf.jd.com/schema/jsf
  957.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  958.        default-lazy-init="false" default-autowire="byName">
  959.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  960.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  961. </beans><?xml version="1.0" encoding="UTF-8"?>
  962. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  963.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  964.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  965.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  966.        http://jsf.jd.com/schema/jsf
  967.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  968.        default-lazy-init="false" default-autowire="byName">
  969.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  970.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  971. </beans><?xml version="1.0" encoding="UTF-8"?>
  972. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  973.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  974.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  975.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  976.        http://jsf.jd.com/schema/jsf
  977.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  978.        default-lazy-init="false" default-autowire="byName">
  979.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  980.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  981. </beans> Class c = null;50<?xml version="1.0" encoding="UTF-8"?>
  982. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  983.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  984.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  985.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  986.        http://jsf.jd.com/schema/jsf
  987.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  988.        default-lazy-init="false" default-autowire="byName">
  989.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  990.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  991. </beans><?xml version="1.0" encoding="UTF-8"?>
  992. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  993.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  994.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  995.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  996.        http://jsf.jd.com/schema/jsf
  997.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  998.        default-lazy-init="false" default-autowire="byName">
  999.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1000.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1001. </beans><?xml version="1.0" encoding="UTF-8"?>
  1002. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1003.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1004.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1005.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1006.        http://jsf.jd.com/schema/jsf
  1007.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1008.        default-lazy-init="false" default-autowire="byName">
  1009.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1010.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1011. </beans> try {51<?xml version="1.0" encoding="UTF-8"?>
  1012. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1013.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1014.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1015.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1016.        http://jsf.jd.com/schema/jsf
  1017.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1018.        default-lazy-init="false" default-autowire="byName">
  1019.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1020.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1021. </beans><?xml version="1.0" encoding="UTF-8"?>
  1022. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1023.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1024.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1025.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1026.        http://jsf.jd.com/schema/jsf
  1027.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1028.        default-lazy-init="false" default-autowire="byName">
  1029.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1030.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1031. </beans><?xml version="1.0" encoding="UTF-8"?>
  1032. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1033.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1034.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1035.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1036.        http://jsf.jd.com/schema/jsf
  1037.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1038.        default-lazy-init="false" default-autowire="byName">
  1039.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1040.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1041. </beans><?xml version="1.0" encoding="UTF-8"?>
  1042. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1043.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1044.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1045.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1046.        http://jsf.jd.com/schema/jsf
  1047.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1048.        default-lazy-init="false" default-autowire="byName">
  1049.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1050.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1051. </beans> //反射加载类52<?xml version="1.0" encoding="UTF-8"?>
  1052. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1053.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1054.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1055.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1056.        http://jsf.jd.com/schema/jsf
  1057.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1058.        default-lazy-init="false" default-autowire="byName">
  1059.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1060.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1061. </beans><?xml version="1.0" encoding="UTF-8"?>
  1062. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1063.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1064.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1065.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1066.        http://jsf.jd.com/schema/jsf
  1067.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1068.        default-lazy-init="false" default-autowire="byName">
  1069.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1070.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1071. </beans><?xml version="1.0" encoding="UTF-8"?>
  1072. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1073.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1074.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1075.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1076.        http://jsf.jd.com/schema/jsf
  1077.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1078.        default-lazy-init="false" default-autowire="byName">
  1079.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1080.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1081. </beans><?xml version="1.0" encoding="UTF-8"?>
  1082. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1083.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1084.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1085.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1086.        http://jsf.jd.com/schema/jsf
  1087.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1088.        default-lazy-init="false" default-autowire="byName">
  1089.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1090.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1091. </beans> c = Class.forName(cn, false, loader);53<?xml version="1.0" encoding="UTF-8"?>
  1092. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1093.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1094.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1095.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1096.        http://jsf.jd.com/schema/jsf
  1097.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1098.        default-lazy-init="false" default-autowire="byName">
  1099.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1100.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1101. </beans><?xml version="1.0" encoding="UTF-8"?>
  1102. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1103.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1104.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1105.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1106.        http://jsf.jd.com/schema/jsf
  1107.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1108.        default-lazy-init="false" default-autowire="byName">
  1109.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1110.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1111. </beans><?xml version="1.0" encoding="UTF-8"?>
  1112. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1113.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1114.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1115.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1116.        http://jsf.jd.com/schema/jsf
  1117.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1118.        default-lazy-init="false" default-autowire="byName">
  1119.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1120.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1121. </beans> } catch (ClassNotFoundException x) {54<?xml version="1.0" encoding="UTF-8"?>
  1122. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1123.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1124.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1125.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1126.        http://jsf.jd.com/schema/jsf
  1127.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1128.        default-lazy-init="false" default-autowire="byName">
  1129.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1130.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1131. </beans><?xml version="1.0" encoding="UTF-8"?>
  1132. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1133.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1134.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1135.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1136.        http://jsf.jd.com/schema/jsf
  1137.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1138.        default-lazy-init="false" default-autowire="byName">
  1139.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1140.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1141. </beans><?xml version="1.0" encoding="UTF-8"?>
  1142. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1143.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1144.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1145.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1146.        http://jsf.jd.com/schema/jsf
  1147.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1148.        default-lazy-init="false" default-autowire="byName">
  1149.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1150.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1151. </beans> }55<?xml version="1.0" encoding="UTF-8"?>
  1152. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1153.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1154.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1155.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1156.        http://jsf.jd.com/schema/jsf
  1157.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1158.        default-lazy-init="false" default-autowire="byName">
  1159.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1160.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1161. </beans><?xml version="1.0" encoding="UTF-8"?>
  1162. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1163.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1164.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1165.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1166.        http://jsf.jd.com/schema/jsf
  1167.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1168.        default-lazy-init="false" default-autowire="byName">
  1169.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1170.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1171. </beans><?xml version="1.0" encoding="UTF-8"?>
  1172. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1173.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1174.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1175.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1176.        http://jsf.jd.com/schema/jsf
  1177.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1178.        default-lazy-init="false" default-autowire="byName">
  1179.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1180.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1181. </beans> try {56<?xml version="1.0" encoding="UTF-8"?>
  1182. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1183.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1184.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1185.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1186.        http://jsf.jd.com/schema/jsf
  1187.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1188.        default-lazy-init="false" default-autowire="byName">
  1189.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1190.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1191. </beans><?xml version="1.0" encoding="UTF-8"?>
  1192. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1193.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1194.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1195.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1196.        http://jsf.jd.com/schema/jsf
  1197.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1198.        default-lazy-init="false" default-autowire="byName">
  1199.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1200.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1201. </beans><?xml version="1.0" encoding="UTF-8"?>
  1202. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1203.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1204.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1205.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1206.        http://jsf.jd.com/schema/jsf
  1207.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1208.        default-lazy-init="false" default-autowire="byName">
  1209.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1210.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1211. </beans><?xml version="1.0" encoding="UTF-8"?>
  1212. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1213.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1214.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1215.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1216.        http://jsf.jd.com/schema/jsf
  1217.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1218.        default-lazy-init="false" default-autowire="byName">
  1219.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1220.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1221. </beans> //实例化57<?xml version="1.0" encoding="UTF-8"?>
  1222. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1223.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1224.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1225.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1226.        http://jsf.jd.com/schema/jsf
  1227.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1228.        default-lazy-init="false" default-autowire="byName">
  1229.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1230.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1231. </beans><?xml version="1.0" encoding="UTF-8"?>
  1232. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1233.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1234.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1235.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1236.        http://jsf.jd.com/schema/jsf
  1237.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1238.        default-lazy-init="false" default-autowire="byName">
  1239.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1240.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1241. </beans><?xml version="1.0" encoding="UTF-8"?>
  1242. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1243.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1244.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1245.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1246.        http://jsf.jd.com/schema/jsf
  1247.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1248.        default-lazy-init="false" default-autowire="byName">
  1249.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1250.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1251. </beans><?xml version="1.0" encoding="UTF-8"?>
  1252. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1253.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1254.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1255.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1256.        http://jsf.jd.com/schema/jsf
  1257.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1258.        default-lazy-init="false" default-autowire="byName">
  1259.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1260.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1261. </beans> S p = service.cast(c.newInstance());58<?xml version="1.0" encoding="UTF-8"?>
  1262. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1263.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1264.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1265.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1266.        http://jsf.jd.com/schema/jsf
  1267.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1268.        default-lazy-init="false" default-autowire="byName">
  1269.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1270.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1271. </beans><?xml version="1.0" encoding="UTF-8"?>
  1272. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1273.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1274.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1275.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1276.        http://jsf.jd.com/schema/jsf
  1277.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1278.        default-lazy-init="false" default-autowire="byName">
  1279.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1280.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1281. </beans><?xml version="1.0" encoding="UTF-8"?>
  1282. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1283.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1284.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1285.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1286.        http://jsf.jd.com/schema/jsf
  1287.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1288.        default-lazy-init="false" default-autowire="byName">
  1289.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1290.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1291. </beans><?xml version="1.0" encoding="UTF-8"?>
  1292. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1293.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1294.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1295.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1296.        http://jsf.jd.com/schema/jsf
  1297.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1298.        default-lazy-init="false" default-autowire="byName">
  1299.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1300.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1301. </beans> //放进缓存59<?xml version="1.0" encoding="UTF-8"?>
  1302. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1303.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1304.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1305.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1306.        http://jsf.jd.com/schema/jsf
  1307.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1308.        default-lazy-init="false" default-autowire="byName">
  1309.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1310.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1311. </beans><?xml version="1.0" encoding="UTF-8"?>
  1312. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1313.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1314.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1315.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1316.        http://jsf.jd.com/schema/jsf
  1317.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1318.        default-lazy-init="false" default-autowire="byName">
  1319.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1320.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1321. </beans><?xml version="1.0" encoding="UTF-8"?>
  1322. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1323.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1324.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1325.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1326.        http://jsf.jd.com/schema/jsf
  1327.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1328.        default-lazy-init="false" default-autowire="byName">
  1329.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1330.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1331. </beans><?xml version="1.0" encoding="UTF-8"?>
  1332. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1333.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1334.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1335.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1336.        http://jsf.jd.com/schema/jsf
  1337.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1338.        default-lazy-init="false" default-autowire="byName">
  1339.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1340.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1341. </beans> providers.put(cn, p);60<?xml version="1.0" encoding="UTF-8"?>
  1342. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1343.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1344.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1345.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1346.        http://jsf.jd.com/schema/jsf
  1347.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1348.        default-lazy-init="false" default-autowire="byName">
  1349.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1350.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1351. </beans><?xml version="1.0" encoding="UTF-8"?>
  1352. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1353.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1354.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1355.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1356.        http://jsf.jd.com/schema/jsf
  1357.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1358.        default-lazy-init="false" default-autowire="byName">
  1359.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1360.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1361. </beans><?xml version="1.0" encoding="UTF-8"?>
  1362. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1363.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1364.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1365.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1366.        http://jsf.jd.com/schema/jsf
  1367.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1368.        default-lazy-init="false" default-autowire="byName">
  1369.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1370.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1371. </beans><?xml version="1.0" encoding="UTF-8"?>
  1372. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1373.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1374.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1375.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1376.        http://jsf.jd.com/schema/jsf
  1377.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1378.        default-lazy-init="false" default-autowire="byName">
  1379.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1380.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1381. </beans> return p;61<?xml version="1.0" encoding="UTF-8"?>
  1382. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1383.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1384.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1385.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1386.        http://jsf.jd.com/schema/jsf
  1387.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1388.        default-lazy-init="false" default-autowire="byName">
  1389.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1390.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1391. </beans><?xml version="1.0" encoding="UTF-8"?>
  1392. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1393.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1394.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1395.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1396.        http://jsf.jd.com/schema/jsf
  1397.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1398.        default-lazy-init="false" default-autowire="byName">
  1399.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1400.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1401. </beans><?xml version="1.0" encoding="UTF-8"?>
  1402. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1403.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1404.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1405.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1406.        http://jsf.jd.com/schema/jsf
  1407.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1408.        default-lazy-init="false" default-autowire="byName">
  1409.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1410.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1411. </beans> } catch (Throwable x) {62<?xml version="1.0" encoding="UTF-8"?>
  1412. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1413.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1414.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1415.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1416.        http://jsf.jd.com/schema/jsf
  1417.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1418.        default-lazy-init="false" default-autowire="byName">
  1419.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1420.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1421. </beans><?xml version="1.0" encoding="UTF-8"?>
  1422. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1423.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1424.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1425.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1426.        http://jsf.jd.com/schema/jsf
  1427.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1428.        default-lazy-init="false" default-autowire="byName">
  1429.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1430.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1431. </beans><?xml version="1.0" encoding="UTF-8"?>
  1432. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1433.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1434.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1435.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1436.        http://jsf.jd.com/schema/jsf
  1437.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1438.        default-lazy-init="false" default-autowire="byName">
  1439.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1440.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1441. </beans><?xml version="1.0" encoding="UTF-8"?>
  1442. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1443.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1444.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1445.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1446.        http://jsf.jd.com/schema/jsf
  1447.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1448.        default-lazy-init="false" default-autowire="byName">
  1449.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1450.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1451. </beans> //..63<?xml version="1.0" encoding="UTF-8"?>
  1452. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1453.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1454.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1455.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1456.        http://jsf.jd.com/schema/jsf
  1457.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1458.        default-lazy-init="false" default-autowire="byName">
  1459.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1460.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1461. </beans><?xml version="1.0" encoding="UTF-8"?>
  1462. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1463.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1464.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1465.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1466.        http://jsf.jd.com/schema/jsf
  1467.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1468.        default-lazy-init="false" default-autowire="byName">
  1469.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1470.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1471. </beans><?xml version="1.0" encoding="UTF-8"?>
  1472. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1473.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1474.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1475.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1476.        http://jsf.jd.com/schema/jsf
  1477.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1478.        default-lazy-init="false" default-autowire="byName">
  1479.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1480.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1481. </beans> }64<?xml version="1.0" encoding="UTF-8"?>
  1482. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1483.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1484.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1485.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1486.        http://jsf.jd.com/schema/jsf
  1487.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1488.        default-lazy-init="false" default-autowire="byName">
  1489.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1490.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1491. </beans><?xml version="1.0" encoding="UTF-8"?>
  1492. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1493.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1494.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1495.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1496.        http://jsf.jd.com/schema/jsf
  1497.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1498.        default-lazy-init="false" default-autowire="byName">
  1499.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1500.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1501. </beans><?xml version="1.0" encoding="UTF-8"?>
  1502. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1503.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1504.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1505.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1506.        http://jsf.jd.com/schema/jsf
  1507.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1508.        default-lazy-init="false" default-autowire="byName">
  1509.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1510.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1511. </beans> //..65<?xml version="1.0" encoding="UTF-8"?>
  1512. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1513.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1514.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1515.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1516.        http://jsf.jd.com/schema/jsf
  1517.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1518.        default-lazy-init="false" default-autowire="byName">
  1519.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1520.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1521. </beans><?xml version="1.0" encoding="UTF-8"?>
  1522. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1523.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1524.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1525.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1526.        http://jsf.jd.com/schema/jsf
  1527.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1528.        default-lazy-init="false" default-autowire="byName">
  1529.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1530.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1531. </beans> }66<?xml version="1.0" encoding="UTF-8"?>
  1532. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  1533.        xmlns:jsf="http://jsf.jd.com/schema/jsf"
  1534.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  1535.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  1536.        http://jsf.jd.com/schema/jsf
  1537.        http://jsf.jd.com/schema/jsf/jsf.xsd"
  1538.        default-lazy-init="false" default-autowire="byName">
  1539.     <jsf:consumer id="skuQueryService" interface="com.jdwl.wms.masterdata.api.sku.SkuQueryService"
  1540.                   alias="${jsf.consumer.masterdata.alias}" protocol="jsf" check="false" timeout="10000"  retries="3"/>
  1541. </beans> }67 }
复制代码
上面的代码只贴出了部分关键的实现,有兴趣的读者可以自己去研究,下面贴出比较直观的spi加载的主要流程供参考:

4 总结

SPI的两种提供方式各有优缺点,jar包方式部署成本低、依赖多,增加调用方的配置成本;jsf接口方式部署成本高,但调用方依赖少,只需要通过别名识别不同的BP。
总结下spi能带来的好处:

  • 不需要改动源码就可以实现扩展,解耦。
  • 实现扩展对原来的代码几乎没有侵入性。
  • 只需要添加配置就可以实现扩展,符合开闭原则。
作者:京东物流 贾永强
来源:京东云开发者社区 自猿其说Tech 转载请注明来源

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

正序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

没腿的鸟

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表