Controller
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13@ApiOperation(value = "根据进件号查询 一度二度关联信息及PageRank值") @GetMapping("/feature") @ResponseBody public ResultMessage queryFeatureMessage(@RequestParam @NotNull @ApiParam("进件号") String intopieceId, @RequestParam @NotNull @ApiParam("进件类型") String type , HttpServletRequest httprequest) { MDCUtil.putList(null, IPUtil.getClientIp(httprequest),intopieceId); log.info(intopieceId + ",Msg:" + success.toString()); MDCUtil.removeList(); return success; }
Utils
复制代码
1
2
3
4
5
6
7
8public class IPUtil { public static String getClientIp(HttpServletRequest request) { if (request == null) { return ""; } String ip = request.getHeader("x-forwarded-for"); if (ip == null || ip.length() == 0) { ip = request.getH
最后
以上就是彪壮老鼠最近收集整理的关于Logback 标准化模板ControllerUtils的全部内容,更多相关Logback内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复