使用Spring AOP记录方法条目 [英] Log method entries with Spring AOP

查看:130
本文介绍了使用Spring AOP记录方法条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道如何记录方法条目(包括参数值)并在跟踪级别使用Spring AOP和log4j退出。它应该能够从多个包中记录类。

Anyone has any idea on how to log method entries(including parameters value) and exit with Spring AOP and log4j at trace level. It should be able to log classes from multiple packages.

推荐答案

您可以使用Spring框架的PerformanceMonitorInterceptor来记录方法条目。 href =http://architects.dzone.com/articles/monitoring-performance-spring =nofollow>这里是DZone的示例用法。

You can use PerformanceMonitorInterceptor of Spring framework to log method entries.Here is the sample usage from DZone.

这篇关于使用Spring AOP记录方法条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆