远程调用

来源:互联网 发布:数据科学入门 pdf下载 编辑:程序博客网 时间:2024/05/16 02:59

在服务端的spring文件了里配置

<bean id="Service1"
class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
 
<!--<property name="serviceUrl"    
value="${ecas.address}/项目名称/remoting/MyService" />-->
<property name="serviceUrl"    
value="http://127.0.0.1:8080/项目名称/remoting/MyService" />
<property name="serviceInterface"
value="com.aa.bb.service.Service11" />
</bean>  

同时在无负担准备好com.erayt.folder.service.Service11的包和文件

然后再客户端spring文件里

<bean id="MyService" class="com.aa.bb.service.impl.Service11Impl"/>

原创粉丝点击