@ApiImplicitParam
该注解可替代另一个@ApiParam,用于统一对Spring MVC的参数进行定义。
以下是该注解的参数:
原文链接:https://blog.csdn.net/qq_15003505/article/details/113844854
swagger @RequestBody Map 参数显示
@RequestMapping(value = "/findAppMenu", method = RequestMethod.POST)
public BRD<VoAppMenu,List<VoTeamInfo>> findAppMenu(
@ApiJsonObject(name = "userInfo", value = {
@ApiJsonProperty(key = "userName", example = "user3", description = "用户名")
})
@RequestBody Map<String,String> map){
BRD<VoAppMenu,List<VoTeamInfo>> result = new BRD<>();
List<VoAppMenu> menus = roleService.findAppMenu(map.get("userName"));
List<VoTeamInfo> teams = roleService.findTeamUser(map.get("userName"));
result.setData(menus);
result.setOrtherData(teams);
return result;
}
使用map接受多个参数,map key 注释
原文链接:https://blog.csdn.net/zhoucanji/article/details/101004138