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>