【发布时间】:2012-12-18 17:39:08
【问题描述】:
我正在创建自己的自定义快捷方式注释,如Spring Documentation 中所述:
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Transactional(value = "Custom", readOnly = true)
public @interface CustomTransactional {
}
是否有可能,通过我的自定义注释,我还可以设置任何其他属性,这些属性在@Transactional 中可用?我希望能够使用我的注释,例如:
@CustomTransactional(propagation = Propagation.REQUIRED)
public class MyClass {
}
【问题讨论】:
标签: java annotations spring-annotations