??????????????? Spring ???????????????????????? REST API?? ??? Spring MVC ???????д REST ????????????
????????????? Spring MVC ????????????????????????? RESTful ?????????????????????????????????????????? REST APIs ?в???????? UI ???????????????? Spring MVC ???????????????????
????????????????????????е??????????????У???????漰 RESTful ??????????????????????????????????? web ??????????? Spring MVC ??????????
????RESTful ?????
??????????????? RESETful ??????????????????????????? HTTP ???? ???????????????????з?????????????? HTTP ?淶?е?????????????????????????? HTTP ??????????Щ?????????????????????????????????????????????????
????????????? 24 ??????? HTTP ??????????????????? 18 ?????????????? 4xx ????? 6 ????????????????? 5xx ?????????? WebDav ??淶?л???????????????????Щ?????????????????????????????????? 24 ??????????????????? —— ??????????????????????????????????
????????????????? REST API ?????????????£????????????????????????????????????????????????????????????????? REST API ???????????????????????????
????REST ?????
???????????????????????????????????????????????????????Щ?????????????????????????????????????????????????????????????????????????????????????????????????????????
????Apigee ??????????????? RESTful ?????????????????????????????????????????????????????????顣
?????????????????????REST???????????????“?????”???????JSON?? ??????????XML????????????API?????????
????{
????"status": 404??
????"code": 40483??
????"message": "Oops! It looks like that file does not exist."??
????"developerMessage": "File resource for path /uploads/foobar.txt does not exist.  Please wait 10 minutes until the upload batch completes before checking again."??
????"moreInfo": "http://www.mycompany.com/errors/40483"
????}
?????????????????????Щ?????
????status
????status ??????????????е? HTTP ????integer?????????????????????????????????????????????????????κ? REST ?????????????????????????????????????????????????б??????????λ??????????????????
????code
????code ?????????????????? REST API ??????????????????й????????????????????
??????????? 24 ?????????? HTTP ???????????????????????????????????????????????????????????????????????????? API ?????????????????????á?
?????????У??????????? 40483??????????? 404 ??ζ??????????????????????ó??????????? 40483 ??ζ????????????????????????????????δ??????????????????
?????????????????“??????”????е???????????????????????????????????????? API ??????????????????
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????“????????????????”?????????????? API ??????????????/???????????????????á?
????message
????message ??????????????????????????????????????ó????????????????????????????????ò???????????????????????????????e?????????????????????e????? developerMessage ?????ж?????????
???????????????
?????????????? REST API ????? ?????????????????????????????????????????????????????????????????????? API ?????????д?????????????????????????????????????????????????????????????????????????? API ???????????????á?
????developerMessage
????developerMessage ????????????ж?????? REST API ?????????????????????????????????????????????????????????????????????????????????????
????moreInfo
????moreInfo ?????????? URL?? ?κο????? URL ???????????????е???????????????URL ??????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????κ????????????????????????????“??????????”????????????????????????????κζ????????????????????????????????????????? API??
???????? Twilio ????????????????????????????????????????????????????????????????????????????????????????κα?????????????? API ?????/???????????????
???????????
???????????????????????????????Щ??????????????????? Spring MVC ?? REST API ?????