JAX-RS(Java™ API for RESTful Web Services)는 자바 플랫폼에서 경량화된 REST 방식의 웹 애플리케이션 구현을 지원하는 자바 API이다.
SOAP기반의 SOA 연동은 자바 애플리케이션을 무겁게 한다는 비판과 함께, 최근 웹 애플리케이션의 경향인 AJAX기반으로 JSON이나 RSS와 같이 간결한 프로토콜을 사용한 연동이 보편화되면서 쉽게 구현할 수 있도록 Java EE에 JAX-RS 라는 사양이 포함되고 있다.
구현 플랫폼
Specification
JAX-RS provides some annotations to aid in mapping a resource class (a POJO) as a web resource. The annotations include:
- @Path specifies the relative path for a resource class or method.
- @GET, @PUT, @POST, @DELETE and @HEAD specify the HTTP request type of a resource.
- @Produces specifies the response MIME media types.
- @Consumes specifies the accepted request media types.
In addition, it provides further annotations to method parameters to pull information out of the request. All the @*Param annotations take a key of some form which is used to look up the value required.
- @PathParam binds the parameter to a path segment.
- @QueryParam binds the parameter to the value of an HTTP query parameter.
- @MatrixParam binds the parameter to the value of an HTTP matrix parameter.
- @HeaderParam binds the parameter to an HTTP header value.
- @CookieParam binds the parameter to a cookie value.
- @FormParam binds the parameter to a form value.
- @DefaultValue specifies a default value for the above bindings when the key is not found.
http://ko.wikipedia.org/wiki/JAX-RS
http://en.wikipedia.org/wiki/Java_API_for_RESTful_Web_Services
'program language > java' 카테고리의 다른 글
log4j 설정 (1) | 2012.04.09 |
---|---|
junit4 정리 (0) | 2012.04.04 |
JDO(Java Data Object) (0) | 2012.03.15 |
JSR(Java Specification Requests),JCP(Java Community Process) (1) | 2012.03.06 |
anotation (0) | 2011.09.21 |