java为什么没有跟踪AspectJ前后的日志?
我想跟踪日志
{
@Aspect
@Component
public class AspectJPay {
private static final Logger log = LoggerFactory.getLogger(AxiPayCustomerController.class);
@Before("execution(* lk.ideahub.symphony.controller.axipay.customer.AxiPayCustomerController.*(..))")
public void logBefore(JoinPoint joinPoint) {
Date date = new Date();
String strDateFormat = "hh:mm:ss a";
DateFormat dateFormat = new SimpleDateFormat(strDateFormat);
String formattedDate = dateFormat.format(date);
log.info("Current Start time Time is : {} {}", formattedDate, joinPoint.getSignature().getName());
System.out.println("Current time of the day using Date - 12 hour format: " + formattedDate);
}
@After("execution(* lk.ideahub.symphony.controller.axipay.customer.AxiPayCustomerController.*(..))")
public void logAfter(JoinPoint joinPoint) {
Date date = new Date();
String strDateFormat = "hh:mm:ss a";
DateFormat dateFormat = new SimpleDateFormat(strDateFormat);
String formattedDate = dateFormat.format(date);
log.info("Current End Time is : {} {}", formattedDate, joinPoint.getSignature().getName());
System.out.println("Current time of the day using Date - 12 hour format: " + formattedDate);
}
}
}
但是没有一个日志被追踪到。有人知道我为什么错了吗?或者我想知道要导入的实际gradle依赖项吗
请帮帮我 谢谢
共 (0) 个答案