Spring框架事务实现在哪里?
如何找到springframework的事务性注释的实现? 我只找到下面的代码: 这是反编译的.class文件Spring框架事务实现在哪里?,spring,spring-mvc,transactions,implementation,Spring,Spring Mvc,Transactions,Implementation,如何找到springframework的事务性注释的实现? 我只找到下面的代码: 这是反编译的.class文件 package org.springframework.transaction.annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.anno
package org.springframework.transaction.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Transactional {
@AliasFor("transactionManager")
String value() default "";
@AliasFor("value")
String transactionManager() default "";
Propagation propagation() default Propagation.REQUIRED;
Isolation isolation() default Isolation.DEFAULT;
int timeout() default -1;
boolean readOnly() default false;
Class<? extends Throwable>[] rollbackFor() default {};
String[] rollbackForClassName() default {};
Class<? extends Throwable>[] noRollbackFor() default {};
String[] noRollbackForClassName() default {};
}
package org.springframework.transaction.annotation;
导入java.lang.annotation.Documented;
导入java.lang.annotation.ElementType;
导入java.lang.annotation.Inherited;
导入java.lang.annotation.Retention;
导入java.lang.annotation.RetentionPolicy;
导入java.lang.annotation.Target;
导入org.springframework.core.annotation.AliasFor;
@目标({ElementType.TYPE,ElementType.METHOD})
@保留(RetentionPolicy.RUNTIME)
@继承的
@记录
公共@接口事务{
@别名(“transactionManager”)
字符串值()默认为“”;
@别名(“值”)
字符串transactionManager()默认为“”;
传播()默认传播.REQUIRED;
隔离隔离()默认隔离。默认;
int timeout()默认值为-1;
boolean readOnly()默认值为false;
类后台反射是播放器,您可以看到TransactionAnnotationParser.java接口的实现(解析已知事务注释类型的策略接口。AnnotationTransactionAttributeSource委托给此类解析器,以支持特定的注释类型,如Spring自己的Transactional、JTA 1.2的Transactional或EJB3的TransactionAttribute。)
基于实现是解析Spring事务注释及其解析事务的策略实现之一。
如果你需要深入研究这个问题,那么你需要完成这个模块