JAX-RS annotations
@Path("resource_path"):
The @Path annotation defines the path to the base URL or resource_path. The base URL is based on the application's name, the servlet, and the URL pattern from the web.xml configuration file.
@PathParam:
The @PathParam annotation is used to inject values from the URL into a method parameter. In this way, one can inject, say, the ID of a resource into the method for getting the correct object.
@GET:
The @GET annotation indicates that the method will answer to an HTTP GET request.
@PUT:
The @PUT annotation indicates that the method will answer to an HTTP PUT request.
@POST:
The @POST annotation indicates that the method will answer to an HTTP POST request.
@DELETE:
The @DELETE annotation indicates that the method will answer to an HTTP DELETE request.
@Produces(MediaType.TEXT_PLAIN):
The @Produces annotation defines which MIME type is delivered by a method annotated with any HTTP annotated methods. In the given example, a text (text/plain) is produced. Other examples would be application/xml or application/json.
@Consumes(type):
The @Consumes annotation defines which MIME type is consumed by this method.
JAX-RS annotations的更多相关文章
- 使用 Zipkin 和 Brave 实现分布式系统追踪(基础篇)
一.Zipkin 1.1.简介 Zipkin 是一款开源的分布式实时数据追踪系统(Distributed Tracking System),基于 Google Dapper 的论文设计而来,由 Twi ...
- Eclipse 双击变量,其他相同变量有底色
转载:http://blog.csdn.net/majian_1987/article/details/46691697 方便下次查找. 在Eclipse中,鼠标选中或者光标移动到Java类的变量名时 ...
- JAX-RS
一.简介 JAX-RS(Java API for RESTful Web Services),是JAVAEE6中提出的Java 编程语言的应用程序接口,支持按照表述性状态转移(REST)架构风格创建W ...
- Java Web Services (0) - Overview
前言第1章 Web服务快速入门 1.1 Web服务杂项 1.2 Web服务有什么好处 1.3 Web服务和面向服务的架构 1.4 Web服务简史 1.4.1 从DCE/RPC到XML-RPC 1.4. ...
- 调用链系列二、Zipkin 和 Brave 实现(springmvc、RestTemplate)服务调用跟踪
Brave介绍 1.Brave简介 Brave 是用来装备 Java 程序的类库,提供了面向标准Servlet.Spring MVC.Http Client.JAX RS.Jersey.Resteas ...
- Zipkin和Brave实现http服务调用的跟踪
使用Zipkin和Brave实现http服务调用的跟踪,Brave 是用来装备Java程序的类库,提供了面向标准Servlet.Spring MVC.Http Client.JAX RS.Jersey ...
- 原理分析dubbo分布式应用中使用zipkin做链路追踪
zipkin是什么 Zipkin是一款开源的分布式实时数据追踪系统(Distributed Tracking System),基于 Google Dapper的论文设计而来,由 Twitter 公司开 ...
- java各种框架的比较,分析
Spring 框架 优点 1.提供了一种管理对象的方法,可以把中间层的对象有效地组织起来 2.采用了分层结构,可以增量引入到项目中. 3.代码测试较容易 4.非侵入性,应用程序对Spring API的 ...
- apache基金会开源项目简介
apache基金会开源项目简介 项目名称 描述 HTTP Server 互联网上首屈一指的HTTP服务器 Abdera Apache Abdera项目的目标是建立一个功能完备,高效能的IETF ...
- 怎样在 Azure 应用服务中生成和部署 Java API 应用
先决条件 Java 开发人员工具包 8(或更高版本) 已在开发计算机上安装 Maven 已在开发计算机上安装 Git Azure 订阅付费版或试用版 HTTP 测试应用程序,如 Postman 使用 ...
随机推荐
- NSMutableURLRequest Http 请求 同步 异步
#pragma mark get country code//同步 -(void)getFKjsonCountryCode { dispatch_async(dispatch_get_global_q ...
- JQuery 之 在数据加载完成后才自动执行函数
数据加载完成执行: $(window).load(function(){ ... }); 进入页就执行,不论等数据是否加载完成: $(document).ready(function(){ ... } ...
- 如何导入外部Git仓库到中国源代码托管平台(Git@OSC)
git clone --bare http://git.rcrtm.com/git/dianli.git git clone --mirror https://git.oschina.net/cand ...
- 安装 LUA
为了以后方便,记录一下步骤 1.yum install readline-devel 2.wget http://www.lua.org/ftp/lua-5.1.4.tar.gz 3.cd lua-5 ...
- 用Putty连接连接Linux
1:vi打开 [root@gechong]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 2:编辑IP地址 3:重启服务 [root@gechong /] ...
- linux C++ 莫名奇异的段错误(segmentation fault),无法调用其他函数
进来在linux下开发C++项目,遇到了非常奇怪的bug. 项目须要多线程实现,在写好代码后,每当执行到线程函数内部,当内部调用其他函数如printf.fopen等时就会提示段错误(segmentat ...
- RSA密钥生成、加密解密、签名验签
RSA 非对称加密公钥加密,私钥解密 私钥签名,公钥验签 下面是生成随机密钥对: //随机生成密钥对 KeyPairGenerator keyPairGen = null; try { keyPair ...
- jQuery处理下拉框(Select、radio、checkbox等)代码
//遍历option和添加.移除option <script> function changeShipMethod(shipping){ var len = $("select[ ...
- PHP5.4 需要添加的configure参数
./configure --prefix=/usr/local/php --with-gd=/usr/local/gd --with-jpeg-dir=/usr/local/jpeg --with-p ...
- gitlab webhook报500
使用root登陆gitlab,进入如下位置: