网站首页 > 开源技术 正文
RESTEasy is a JBoss project that provides various frameworks to help you build RESTful Web Services and RESTful Java applications. It is a fully certified and portable implementation of the JAX-RS 2.0 specification, a JCP specification that provides a Java API for RESTful Web Services over the HTTP protocol.
RESTEasy是JBoss的开源项目之一,是一个RESTful Web Services框架,RESTEasy的开发者Bill Burke同时也是JAX-RS的J2EE标准制定者之一。JAX-RS是一个JCP制订的新标准,用于规范基于HTTP的RESTful Web Services的API。
RESTEasy相对SOAP来说,REST比SOAP更具优势,架构比SOA更简单轻便。
常用注解
RESTEasy以jaxrs-api.jar包为基础对JAX-RS进行实现,该包中包含了JAX-RS规范所声明的注解。
注解列表
注解 描述 参数
@ApplicationPath 标注资源的root路径,加载子资源文件 value
@Path 标注普通资源路径 value
@GET 获取
@POST 添加
@PUT 整体更新
@PATCH 部分更新(resteasy中并没有)
@DELETE 删除
@PathParam 资源路径参数 value
@QueryParam 资源请求参数 value
@MatrixParam 标注请求资源key-value类型的参数 value
@FormParam 标注表单参数 value
@Encoded 标注需要UrlEncode的元素
@Context 在参数列表注入系统级别参数javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, javax.ws.rs.core.Request, javax.servlet.HttpServletRequest, javax.servlet.HttpServletResponse, javax.servlet.ServletConfig, javax.servlet.ServletContext, and javax.ws.rs.core.SecurityContext objects
@CookieParam 标注需要获取的cookie参数 value
@Consumes 指定client请求数据类型,与client的Content-Type匹配 value
@Produces 指定client接收数据类型,与client的Accept匹配 value
@HeaderParam 标注需要获取的header参数 value
@DefaultValue 标注默认值 value
@Form 标注表单对象,对象中的表单属性需要@FormParam进行标注
Features
- Portable to Tomcat and many other app-server
- Embeddedable server implementation for JUnit testing
- Enhanced client framework
- Client "Browser" cache. Supports HTTP 1.1 caching semantics including cache revalidation
- Server in-memory cache. Local response cache. Automatically handles ETag generation and cache revalidation
- Rich set of providers for: XML, JSON, YAML, Fastinfoset, Multipart, XOP, Atom, etc.
- JAXB marshalling into XML, JSON, Jackson, Fastinfoset, and Atom as well as wrappers for maps, arrays, lists, and sets of JAXB Objects.
- GZIP content-encoding
- Asynchronous HTTP (Comet) abstractions for JBoss Web, Tomcat 6, and Servlet 3.0
- Asynchronous Job Service.
- Rich interceptor model.
- OAuth2 and Distributed SSO with JBoss AS7
- Digital Signature and encryption support with S/MIME and DOSETA
- EJB, Seam, Guice, Spring, Spring MVC and Spring Boot integration
猜你喜欢
- 2024-11-05 Java开发:哪些技能测试来评估Java开发人员的技能?
- 2024-11-05 Dubbo - 多协议发布服务(dubbo协议是属于哪一层的)
- 2024-11-05 关于升级 Spring 等依赖的一些经验
- 2024-11-05 下一代云原生-Quarkus?(云下一代防火墙描述正确的是?)
- 2024-11-05 为什么区域中心采用有限合伙的形式?| EB-5专家解析
- 2024-11-05 Java 近期新闻 JDK 18 发版计划、Spring Data 2021_1_0、苹果开源 GCGC
- 2024-11-05 架构设计:系统间通信——MQ:消息协议(上)
- 2024-11-05 云原生-Quarkus反应性入门(云原生到底解决什么问题)
- 2024-11-05 Java:什么是Quarkus?(quic java)
- 2024-11-05 缅怀科比!杜少直言难接受,前队友长文悼念,70分新星首次发言
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- jdk (81)
- putty (66)
- rufus (78)
- 内网穿透 (89)
- okhttp (70)
- powertoys (74)
- windowsterminal (81)
- netcat (65)
- ghostscript (65)
- veracrypt (65)
- asp.netcore (70)
- wrk (67)
- aspose.words (80)
- itk (80)
- ajaxfileupload.js (66)
- sqlhelper (67)
- express.js (67)
- phpmailer (67)
- xjar (70)
- redisclient (78)
- wakeonlan (66)
- tinygo (85)
- startbbs (72)
- webftp (82)
- vsvim (79)
本文暂时没有评论,来添加一个吧(●'◡'●)