java前后分离了 controller接口GET和POST
通用
@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; }