SpringMVC tag addition: take values from paths, correct parameters, set default values

1. @PathVariable takes the value from the path

E.g:

@RequestMapping("/{url}")
	public String Muchpage(@PathVariable String url) {
		
		return url;
	}

2. @RequestParam tag correction parameters, set default values:

Among them, name="" or value="" can correct the parameter, indicating the attribute name passed from the front desk

defaulvalue=""Set the default value, if a new value is passed in, the value will be replaced

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324791178&siteId=291194637