RMI在Spring中的使用之Hessian,BurlapServiceExporter
这两种实现都是基于http的,只不过Hessian使用二进制格式,Burlap使用XML格式传输文件。在4.x的Spring中官方已经将Burlap作为废弃类,配置和Hessian相同,下面详细讲下HessianServiceExporter 我们首先先试着写下运行程序 服务端 rmi.xml <bean id="accountService" class="example.AccountServiceImpl"> </bean> <bean name="accountExporter" class="org.springframework.remoting.caucho.HessianServiceExporter"> <property name="service" ref="accountService"/> <property name="serviceInterface" value="example.AccountService"/> </bean> <!-- 也可以用下面的方法 --> <bean name="/AccountService" class="org.springframework.remoting.caucho.HessianServiceExporter"> <property name="service" ref="accountService"/