@PathVariable是用来获得请求url中的动态参数的
@RequestMapping("/kf/{date}")
public void example_1(@PathVariable(value = "date") String type) {}
@RequestParam注解主要有哪些参数:
value:参数名字,即入参的请求参数名字
required:是否必须,默认是true,表示请求中一定要有相应的参数
defaultValue:默认值,表示如果请求中没有同名参数时的默认值
@RequestMapping(value = "/service",method = RequestMethod.GET)
public void example_2(@RequestParam String type) {}
it’s very easy to be different,but very difficult to be better.