Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码清单3-3的代码中,@AfterReturning注解下的调用通知没有执行 #1

Open
panda-on opened this issue Apr 27, 2024 · 0 comments

Comments

@panda-on
Copy link

代码位置

在上述的代码中@AfterReturing注解下的调用通知没有执行(日志中没有打印“转账成功”)。当换成如下代码时能够执行(能够打印“转账成功”),调整后的代码放在下面。

     @AfterReturning(value = "doAccountTransaction()", returning = "isTransactionSuccessful")
     public boolean afterTransactionReturns(JoinPoint joinPoint,
                                       boolean isTransactionSuccessful) {
        if (isTransactionSuccessful) {
            LOGGER.info("转账成功 ");
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant