spring-server.xml的作用在于注册需要提供远程能力的service类
配置文件内容:
<bean name="/remoteService" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> <property name="service"> <ref bean="codeService"/> </property> <property name="serviceInterface"> <value>cn.com.do1.component.demoremote.code.service.ICodeService</value> </property> </bean>
spring-dispacher.xml的作用在于为提供了远程能力的service类暴露接入地址
<bean id="demoremote_urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/recommendSuccessService.remote">/remoteService</prop> </props> </property> </bean>
配置组建开启远程服务的功能
<commpant name="demoremote" enabled="true" lastVer=""> <remote type="server"/> </commpant>