TransactionAspectTests.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:class-guard 作者:
/**
 * Note: resolution does not occur. Thus we can't make a class transactional if
 * it implements a transactionally annotated interface. This behaviour could only
 * be changed in AbstractFallbackTransactionAttributeSource in Spring proper.
 * @throws SecurityException
 * @throws NoSuchMethodException
 */
public void testDoesNotResolveTxAnnotationOnMethodFromClassImplementingAnnotatedInterface() throws SecurityException, NoSuchMethodException {
    AnnotationTransactionAttributeSource atas = new AnnotationTransactionAttributeSource();
    Method m = ImplementsAnnotatedInterface.class.getMethod("echo", Throwable.class);
    TransactionAttribute ta = atas.getTransactionAttribute(m, ImplementsAnnotatedInterface.class);
    assertNull(ta);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号