【转载】Springboot2.x 带参数路径访问
参考
正文
/**
* 根据id获取学生信息
*/
@ApiOperation(value = "显示学生信息", notes = "查看别人的(隐藏部分字段)")
@ApiImplicitParam(name = "id", value = "学生id", required = true,
dataType = "int")
@RequestMapping(value = "show/{id}", method = RequestMethod.GET, consumes = "application/json", produces = "application/json;charset=UTF-8")
public ResponseEntity<ResponseBodyDto<InfoStudentDto>> show(@PathVariable("id") Integer id){
InfoStudentDto infoStudentDto = modelMapper.map(studentService.findById(id), InfoStudentDto.class);
return ResponseEntity.ok( new ResponseBodyDto(infoStudentDto));
}
博 主 :夏秋初
地 址 :https://www.cnblogs.com/xiaqiuchu/articles/15114990.html
如果对你有帮助,可以点一下 推荐 或者 关注 吗?会让我的分享变得更有动力~
转载时请带上原文链接,谢谢。
地 址 :https://www.cnblogs.com/xiaqiuchu/articles/15114990.html
如果对你有帮助,可以点一下 推荐 或者 关注 吗?会让我的分享变得更有动力~
转载时请带上原文链接,谢谢。

浙公网安备 33010602011771号