Spring发布和使用Http Invoker
来源:互联网 发布:多进程编程主要目的 编辑:程序博客网 时间:2024/06/10 13:28
Spring发布和使用Http Invoker
假设我们的业务接口是PayMentService,实现类是PayMentServiceImpl
1.发布Http Invoker
<beam id="httpPayMentService" class="org.spingframework.remoting.httpinvoker.HttpInvokerServiceExporter">
<property name="service">
<bean class="org.springinaction.service.PayMentServiceImpl">
<property>
<property name="serviceInterface">
<bean class="org.springinaction.service.PayMentService">
<property>
</bean>
同时,还需要设置urlMapping
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleHandlerMapping">
<property name="mappings">
<props>
<prop key="/pay.service">httpPayMentService</prop>
<props>
</property>
</bean>
然后在web.xml配置映射
<servlet>
<servlet-name>credit</servlet-name>
<servlet-class>rg.springframework.web.servlet.DispatchServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>credit</servlet-name>
<url-pattern>*.service<url-pattern>
</servlet-mapping>
2.使用HttpInvoker
<bean id="paymentService" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactpryBean">
<property name="serviceUrl">
<value>http://${serverBame}/${contextPAth}/pay.service</value>
</property>
<property name="serviceInterface">
<bean class="org.springinaction.service.PayMentService">
</property>
</bean>
- Spring发布和使用Http Invoker
- Spring HTTP Invoker使用
- Spring HTTP Invoker使用
- Spring HTTP Invoker使用介绍
- Spring HTTP Invoker使用介绍
- Spring HTTP Invoker使用介绍
- Spring HTTP Invoker使用介绍
- Spring HTTP Invoker使用介绍
- Spring Http Invoker使用简介
- Spring Http Invoker使用简介
- Spring Http Invoker使用简介
- 使用Spring HTTP invoker进行远程调用
- Spring HTTP invoker简介
- Spring HTTP invoker简介
- Spring HTTP invoker简介
- Spring HTTP invoker简介
- Spring HTTP invoker简介
- spring http invoker 实践
- Maxthon2(Rc)内存泄漏严重!!
- C# 3.0 的自动属性(Automatic Properties)
- 李开复谈比尔•盖茨:他让我感动的地方
- 初试oracle的imp/exp工具
- 用webalizer分析web日志
- Spring发布和使用Http Invoker
- 本博客主要内容为水木社区Algorithm版的看到的问题的学习和解答
- crack max8 的方法
- 佛说爱情(一)
- 测试为先/测试驱动案例分析
- [转帖]怎样让大排不硬
- 佛说爱情(二)
- IBM DB2常用数据库管理命令
- [转帖]Windows Workflow Foundation之旅(一)——概况