(续上文)通过AopContext获取动态代理对象@Componentpublic class AsyncService { public void async1() { System.out.println("1:...
toobugV管理员
文章 8934 篇 | 评论 17 次
(续上文)通过AopContext获取动态代理对象@Componentpublic class AsyncService { public void async1() { System.out.println("1:...
前言在我们使用Spring时,可能有前辈教导过我们,在bean中不要使用this来调用被@Async、@Transactional、@Cacheable等注解标注的方法,this下注解是不生效的。那么大家可曾想过以下...