提交 412f74f6 编写于 作者: S Sam Brannen

Provide meta-annotation support for @Rollback

@Rollback now supports ANNOTATION_TYPE as a target, allowing it to be
used as meta-annotation.

Note: this change was accidentally omitted from the original commit for
SPR-7827.

Issue: SPR-7827
上级 1e6f2e79
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -17,23 +17,24 @@
package org.springframework.test.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
/**
* Test annotation to indicate whether or not the transaction for the annotated
* test method should be <em>rolled back</em> after the test method has
* completed. If {@code true}, the transaction will be rolled back;
* Test annotation used to indicate whether or not the transaction for the
* annotated test method should be <em>rolled back</em> after the test method
* has completed. If {@code true}, the transaction will be rolled back;
* otherwise, the transaction will be committed.
*
* @author Sam Brannen
* @since 2.5
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Retention(RUNTIME)
@Target({ METHOD, ANNOTATION_TYPE })
public @interface Rollback {
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册