JavaWeb-RESTful_ with RESTful development SpringMVC

 

 

RESTful Profile

  A software architectural style, design, rather than the standard, but provides a set of design principles and constraints.

  It is mainly used for client and server interaction class software.

  Based on this style of software can be more concise, more structured and easier to implement caching mechanisms.

 

  RESTful programming can be understood as a habit or style

  1) come with a description of the resource URL

  2) HTTP method described behavior come, HTTP status code of processing results

    get,post,put,delete        200,404

  3) to exchange data using json

 

  Traditional additions and deletions to the investigation

增        /user/add?name=Gary      post
删        /user/delete?id=1        get
改        /user/updata?id=1        get
查        /user/search?id=1        post

 

  Use RESTful style

Increase / User the POST 
puncturing         / User /. 1             the DELETE 
change         / User /. 1             the PUT 
check         / user / 1 Get

 

Guess you like

Origin www.cnblogs.com/1138720556Gary/p/11135931.html