俩项目之间调用

1.访问service的服务端service
    <bean id="accountService"
        class="com.fz.ybn.bmo.account.AccountServerImpl" />

    <bean id="httpAccountService"
        class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
        <property name="service" ref="accountService" />注入service实现类
        <property name="serviceInterface"
            value="com.fz.ybn.intf.account.AccountService" />接口
    </bean>
2.跨项目访问service 
<bean id="accountService" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean"> <property name="serviceUrl"> <value>${serviceUrl}/httpAccountService</value> </property> <property name="serviceInterface"> <value>com.fz.ybn.intf.account.AccountService</value> </property> </bean>

 

posted on 2017-03-27 10:00  老邱2  阅读(142)  评论(0编辑  收藏  举报

导航