I am creating my own custom shortcut annotation, as described in Spring Documentation:
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Transactional(value = "Custom", readOnly = true)
public @interface CustomTransactional {
}
Is it possible, that with my custom annotation I could be also able to set any other attributes, which are available in @Transactional
? I would like to able use my annotation, for example, like this:
@CustomTransactional(propagation = Propagation.REQUIRED)
public class MyClass {
}