`
mrjeye
  • 浏览: 173959 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

hessian spring

阅读更多
web.xml
	<servlet>
		<servlet-name>hessian</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>
				classpath:spring/hessian-servlet.xml
			</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	
	<servlet-mapping>
		<servlet-name>hessian</servlet-name>
		<url-pattern>/hessian/*</url-pattern>
	</servlet-mapping>



hessian-servlet.xml
	<bean id="hessianUser" class="com.xxx.hessian.impl.HUserImpl"
		p:userService-ref="userService"
		p:friendService-ref="friendService"
	/>

	<bean name="/userService" class="org.springframework.remoting.caucho.HessianServiceExporter">
		<property name="service" ref="hessianUser" />
		<property name="serviceInterface" value="com.xxx.hessian.HUserIntf" />
	</bean>



	<bean id="userClient" class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
		<property name="serviceUrl" value="http://127.0.0.1:8080/xxx/hessian/userService" />
		<property name="serviceInterface" value="com.xxx.hessian.HUserIntf" />
	</bean>



1
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics