在Springboot中对AOP进行故障排除
是否可以在Spring Boot上启用任何AOP诊断?我很难弄清楚我的哪个得分正在正确评估。例如,我有类似的东西,
@Pointcut("... ")
public void foo() {
}
@Pointcut("... ")
public void bar() {
}
@Around("foo() && bar()")
public Object doSomething(final ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
System.out.println("*** do something");
}
我的dosomething()
方法没有被执行,我不知道为什么。显然,逻辑比这里只有2个点数要复杂得多。是否有某种诊断记录我可以向我展示每个对点的值?还是告诉我为什么dosomethig()
是或未执行的?
Are there any AOP diagnostics that can be enabled on Spring Boot? I'm having trouble trying to figuring out which of my Pointcuts are evaluating correctly. For example, I have something like this
@Pointcut("... ")
public void foo() {
}
@Pointcut("... ")
public void bar() {
}
@Around("foo() && bar()")
public Object doSomething(final ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
System.out.println("*** do something");
}
My doSomething()
method is not getting executed, and I can't figure out why. Obviously, the logic is a bit more complicateds than shown here with just 2 pointcuts. Is there some sort of diagnostic logging I ca enable that would show me that value of each of the pointcuts? Or something which tells me why doSomethig()
is or is not executed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论