Atitit. Restful service overview and framework Selection
1. RestBasic concepts:1
2. urlNote:1
3. 1
4. Restful framework selection 2
1. Spring MVC (Recomm) 2
2. Jersey 2
5. Reference 3
1. Rest Basic concepts:
· Everything in rest is considered a resource.
· Each resource is identified by a URI.
· Use unified interfaces. The Post, get, put, and delete operations for processing resources are similar to the CREATE, read, update, and delete (crud) operations.
· Stateless. Each request is an independent request. Each request from the client to the server must contain all necessary information for your understanding.
· Communication is presented. For example, XML, JSON
Restful web services simply replace soap-based Web Services and are accepted by large service providers. This article using the Jersey framework extends the JAX-RS API to demonstrate how to create a rest-style Web Service and client.
In Russia's summary, URL fragment 10 has intentions ..
Author: old wow's paw attilax iron, email: [email protected]
Reprinted please indicate Source: http://blog.csdn.net/attilax
2. url Note: 3.
Browser browsing: http: // localhost: 8080/restfulws/rest/userinfoservice/name/Pavithra
Rest: URL pattern in webxml
Uservice: CLS level path Anno
Xxmeth: Meth level path Anno
Pavithra: Anno to inject Val to meth ..
4. Restful framework Selection 1. Spring MVC (Recomm)
Springmvc rest implementation
Springmvc resturl is provided through @ requestmapping and @ pathvariable annotation,
For example, @ requestmapping (value = "/blog/{ID}", method = requestmethod. delete) can be used to process the Delete request of/blog/1.
2. Jersey
Jersey, as a restful framework launched by Oracle,
@ Get
@ Path ("/age/{J }")
@ Produces (mediatype. text_xml)
Public String userage (@ pathparam ("J") Int J ){
5. Reference
Developing restful services with Jersey-jie Dao jdon
Springmvc constructs a restful explanation-stick to the Foundation-blogjava