- @RestControllerと@RequestMappingは、springMVCノートでspringbootに固有のものではありません
- @RestController = @コントローラー+ @ ResponseBody
- @SpringBootApplication = @コンフィギュ+ @ EnableAutoConfiguration + @ ComponentScan
- @GetMapping(パス= "/ {CITY_ID} / {USER_ID}")
@PathVariable( "CITY_ID")文字列cityId、@ PathVariable( "USER_ID")文字列のuserId - (値= "/ V1 / page_user2")@GetMapping
(=真必要はdefaultValue = "0"、名前= "ページ")@RequestParam INTをINTサイズ、から - @RequestMapping( "/ V1 / save_user")
@RequestBodyユーザーユーザー - @PostMapping( "/ V1 /ログイン")
- ( "/ V1 / PUT")を@PutMapping
- @DeleteMapping( "/ V1 /デル" )
コードアドレスhttps://github.com/mambamentality8/springboot
springboot(2)-httpプロトコルインターフェースの開発
おすすめ
転載: www.cnblogs.com/xeclass/p/12633738.html
ランキング