All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.vonce.sql.spring.annotation.DbTransactional Maven / Gradle / Ivy

Go to download

This is a tool that uses java object-oriented idea to write and generate SQL statements. On this basis, it also implements lightweight plug-in support similar to JPA for mybatis and spring JDBC. A large number of common SQL execution methods are built in plug-ins to improve development efficiency, reduce a large number of SQL statement writing, and make developers focus on business code writing.

The newest version!
package cn.vonce.sql.spring.annotation;

import java.lang.annotation.*;

/**
 * 事务注解
 *
 * @author Jovi
 * @email [email protected]
 * @date 2022/12/14 11:21
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DbTransactional {

    /**
     * 是否只读
     *
     * @return
     */
    boolean readOnly() default false;

//    /**
//     * 事务超时时间
//     *
//     * @return
//     */
//    int timeout() default -1;

    /**
     * 什么异常回滚
     *
     * @return
     */
    Class[] rollbackFor() default {};

    /**
     * 什么异常不回滚
     *
     * @return
     */
    Class[] noRollbackFor() default {};

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy