resteasy-spring 3.0.5.Final 配置和项目
来源:互联网 发布:手机vc编程软件 编辑:程序博客网 时间:2024/04/28 13:40
springmvc-resteasy.xml 内容如下
<?xml version="1.0" encoding="UTF-8"?><!-- @author <a href="mailto:sduskis@gmail.com">Solomn Duskis</a> @version $Revision: 1 $ --><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> <description> Import this file in a Spring MVC dispatcher XML environment to get the default implementation of the Spring MVC/RestEasy integration. You can also use this as a template for more advanced functionality, such as configuring multiple RestEasy factories/dispatchers/registries for different scenarios. </description> <!-- ========== Resteasy setup ================ --> <bean id="resteasy.deployment" class="org.jboss.resteasy.spi.ResteasyDeployment" init-method="start" destroy-method="stop"> <description> This bean manages configuring your resteasy runtime. </description> </bean> <bean id="resteasy.registry" factory-bean="resteasy.deployment" factory-method="getRegistry"> <description> Expose the dispatcher's registry as a full-blown Spring bean, so that it can be passed in as a reference. </description> </bean> <bean id="resteasy.dispatcher" factory-bean="resteasy.deployment" factory-method="getDispatcher"> <description> Expose the dispatcher's registry as a full-blown Spring bean, so that it can be passed in as a reference. </description> </bean> <bean id="resteasy.providerFactory" factory-bean="resteasy.deployment" factory-method="getProviderFactory"> <description> This bean manages all of the JAX-RS @Providers. @Providers convert from the inputStream to a java object and from a Java object to an output stream. The SpringBeanPreprocessor scans through the context for all @Provider, and adds them to this instance. </description> </bean> <bean id="resteasy.spring.bean.processor" class="org.jboss.resteasy.plugins.spring.SpringBeanProcessor" depends-on="resteasy.deployment"> <description> Add Resources and @Providers to the appropriate places in Resteasy's infrastructure </description> <constructor-arg ref="resteasy.deployment"/> </bean> <!-- ========== Resteasy Spring MVC setup ================ --> <bean abstract="true" class="org.jboss.resteasy.springmvc.ResteasyHandlerMapping" id="abstract.resteasy.handlerMapping" depends-on="resteasy.deployment"> <description> Tap into the RestEasy registry to find out if any of it's Resources handle a specific URL. This abstract bean has default settings. You can optimize settings for this handler mappings by overriding the "resteasy.handlerMapping" bean and customizing the following: 1) setting a list of interceptors into the "interceptors" property. This is useful when you want to do things like use the OpenSessionInViewInterceptor 2) set order and/or throwNotFound=true which will return the HTTP status codes that core RESTEasy recommends back to the client. It works in conjunction with the "resteasy.exception.handler" </description> <constructor-arg ref="resteasy.deployment"/> <property name="interceptors"> <description> Look for a list/array bean named "resteasy.dispatcher.interceptors" which is composed of HandlerInterceptors to apply to this handler adapter. </description> <bean class="org.jboss.resteasy.plugins.spring.OptionalValueBeanFactory" p:beanName="resteasy.dispatcher.interceptors"/> </property> </bean> <bean id="resteasy.handlerMapping" parent="abstract.resteasy.handlerMapping"/> <bean id="resteasy.handlerAdapter" class="org.jboss.resteasy.springmvc.ResteasyHandlerAdapter" depends-on="resteasy.deployment"> <description> This HandlerAdapter knows how to forward requests to Resteasy for the handling of the service functionality, but not the rendering, which is handled by a ResteasyView. </description> <constructor-arg ref="resteasy.deployment"/> </bean> <bean id="resteasy.exception.handler" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver" p:exceptionMappings="org.jboss.resteasy.spi.NoResourceFoundFailure=resteasy.no.resource.found.view" p:exceptionAttribute="exception"> <description> This will be invoked if an end user overrides resteasy.handlerMapping with throwNotFound=true </description> </bean> <bean id="resteasy.no.resource.found.view" class="org.jboss.resteasy.springmvc.ResteasyNoResourceFoundView" p:deployment-ref="resteasy.deployment"/> <bean id="reateasy.error.view.resolver" class="org.springframework.web.servlet.view.BeanNameViewResolver"/> </beans>
参考文章链接 pager link
reasteasy docs
how to integrate spring and reasteasy
0 0
- resteasy-spring 3.0.5.Final 配置和项目
- resteasy-spring + springmvc + extdirectspring配置
- 普通web项目的Resteasy配置使用
- spring和resteasy整合的注意事项
- Spring和resteasy集成三种方式
- Spring和resteasy集成三种方式
- RESTEasy常用部署方式和配置
- spring和resteasy集成,构建restful风格服务
- spring和resteasy集成,构建restful风格服务
- spring和resteasy集成,构建restful风格服务
- resteasy 与spring集成
- spring集成resteasy实例
- resteasy + mybatis 项目搭建
- Resteasy配置及其使用
- RestEasy的WEB配置
- 翻译restEasy--配置概述
- Resteasy配置及其使用
- resteasy配置与使用
- android 开发零起步学习笔记(二十六):安卓输入法相关知识点 android InputMethodManager
- 回顾2016,展望人工智能的趋势
- 前端校检
- css+ div 实现框架布局
- IOS学前须知
- resteasy-spring 3.0.5.Final 配置和项目
- 第一个Python小程序:Zip文件口令破解器
- 针对监控多路实现思想
- 4.正则表达式实用技巧
- 推荐系统和搜索引擎的关系
- linux的sed取指定字符串中的特定子字符串
- Stackoverflow OutOfMemoryError
- HttpURLConnection 发送PUT请求,设置请求头参数 json请求体
- ImageView 清空图片、去除背景图片