1、server端
web.xml
2、server_config.xml
web.xml
<servlet>
<servlet-name>remoteservice</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/server_config.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>remoteservice</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
2、server_config.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
">
<bean name="/groupService.do"
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
<property name="serviceInterface" value="cn.focus.dc.jiajing.model.thrift.GourpManager$Iface"></property>
<property name="service" ref="groupService"></property>
</bean>
<bean name="/JjCasesThriftService.do"
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
<property name="serviceInterface" value="cn.focus.dc.jiajing.model.thrift.JjCasesService$Iface"></property>
<property name="service" ref="jjCasesThriftService"></property>
</bean>
</beans>