hessian与spring集成,hessian3.2.0升级4.0.7注意事项
来源:互联网 发布:s5支持电信4g网络吗 编辑:程序博客网 时间:2024/05/29 14:29
为了大家学习方便拿spring提到的例子进一步完善来说明
这个bean调用服务端,接收返回的数据,我这里只简单用来测试一下。
<beanid="simpleObject"class="com.rahwind.jjw.hessianservice.SimpleObject">
<propertyname="accountService"ref="accountService"/>
</bean>
<!—通过接口调用服务端实现-->
<beanid="accountService"
class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
<propertyname="serviceUrl"
value="http://localhost:8080/springHessianServer/remoting/AccountService"/>
<propertyname="serviceInterface"value="example.AccountService"/>
</bean>
注意hessian3.2接收集合与自定义pojo时可能会出错数据格式错误
解决方法在accountService中添加属性
<propertyname="hessian2Reply" value="false" />
另外,升级到4.0.7时不支持这个属性,如何不去掉会返回集合数据时会出错。
服务端按spring文档配置即可
<beanid="accountService"class="example.AccountServiceImpl">
<!-- any additionalproperties, maybe a DAO? -->
</bean>
<beanname="/AccountService"
class="org.springframework.remoting.caucho.HessianServiceExporter">
<propertyname="service"ref="accountService"/>
<propertyname="serviceInterface"value="example.AccountService"/>
</bean>
- hessian与spring集成,hessian3.2.0升级4.0.7注意事项
- Hessian与Spring集成
- Hessian入门(与Spring集成)
- Hessian入门(与Spring集成)
- Hessian入门(与Spring集成)
- Hessian入门(与Spring集成)
- Hessian入门(与Spring集成)
- 二、hessian与spring集成
- Hessian入门(与Spring集成)
- Hessian使用(与Spring的集成)
- Spring集成Hessian
- Spring集成Hessian
- spring hessian 集成开发
- Spring 集成 Hessian
- spring 集成 Hessian
- spring集成Hessian
- Spring集成Hessian
- hessian入门,spring集成
- Java读取UTF-8格式txt文件第一行出现乱码——问号“?”及解决;Java读带有BOM的UTF-8文件乱码原因及解决方法
- VMware USB Arbitration Service无法启动,出现错误31:连接到系统上的设备没有发挥作用”
- 卓越领导者的智慧(精华版)
- iphone开发常用代码
- MTK6515 配置lcd背光
- hessian与spring集成,hessian3.2.0升级4.0.7注意事项
- iphone开发中的一些小技术总结
- vb作业,单精度与双精度的区别
- linux(ubuntu)下安装jdk和tomcat
- T-SQL查询进阶--深入浅出视图
- asp.net,对于一个有点经验的猴子,我的要求高么?
- 第十四周任务(一)
- 第一次照搬程序的感想
- pinyin4j的使用