@GetMapping是一个组合注解,是@RequestMapping(method = RequestMethod.GET)的缩写。
@PostMapping是一个组合注解,是@RequestMapping(method = RequestMethod.POST)的缩写。
如果地址路径一样,只是一个是get请求,一个是post请求,则后台不会报错,且会指向正确的接收方法。
@GetMapping是一个组合注解,是@RequestMapping(method = RequestMethod.GET)的缩写。
@PostMapping是一个组合注解,是@RequestMapping(method = RequestMethod.POST)的缩写。
如果地址路径一样,只是一个是get请求,一个是post请求,则后台不会报错,且会指向正确的接收方法。