springboot处理put请求
路径注解
@PutMapping
接收参数注解
@PathVariable
示例:
@PutMapping("users/{uId}/state/{type}")
public ReturnVo
setUserState(@PathVariable("uId") Integer uId
,@PathVariable("type") Boolean type
)
请求路径
http://localhost:8889/api/users/1/state/true
转载请注明原文地址:https://tech.qufami.com/read-1310.html