用于ModelAttribute和Get / Post组合的AspectJ Performance日志记录

时间:2016-08-10 22:31:33

标签: java spring aspectj

使用AspectJ,是否有一种记录GET或POST的方法,不仅包括GET和POST,还包括在ModelAttributes上花费的时间?

例如:

    @ModelAttribute
    public void populateModel(Model model, HttpSession session) { ... }

加号

    @RequestMapping(method=RequestMethod.GET)
    public String  handleGet(HttpSession session, ModelMap model) { ... }

记录为单笔交易?我所看到的是,我可能需要获取ModelAttribute时间并将其添加到Get Time。

理想情况下,我有一个注释切入点放在我的类的开头,它会触发整个用户页面加载的建议:

    @PerformanceLogAnnotation(valueOne=true)
    @Controller
    @RequestMapping(value="/pageTest.html")
    public class TestController { ... }

0 个答案:

没有答案