Springboot AOP Aspect 拦截中 获取HttpServletResponse response

代码: 

        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        HttpServletResponse response = attributes.getResponse();

示例:

 

posted on 2022-11-08 07:33  小目标青年  阅读(61)  评论(0编辑  收藏  举报