通用
@RestController
GET
@RequestMapping("userbase/{userId}")
public User selectById(@PathVariable Integer userId) {
}
POST
@RequestMapping("userbase"
)
public UserBaseInfo selectById(@RequestParam(name = "userid", required =
true) Integer userId){
System.out.println( userId);
UserBaseInfo userBaseInfo =
userBaseInfoService.selectById(userId);
System.out.println( userBaseInfo);
return userBaseInfo;
}
转载于:https://www.cnblogs.com/dianzan/p/11386577.html