摘要: 在项目中,我们往往需要记录数据库操作的时间,根据操作时间的不同,分别记录不同等级的日志。 首先我们可以写一个类实现MethodInterceptor接口: import org.aopalliance.intercept.MethodInterceptor;import org.aopalliance.intercept.MethodInvocation;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;/** * 自定义 AOP 处理时间类 */public class... 阅读全文
posted @ 2013-08-13 23:09 纵酒挥刀斩人头 阅读(1141) 评论(0) 推荐(0) 编辑