io.cucumber.spring.ScenarioScope Maven / Gradle / Ivy
package io.cucumber.spring;
import org.apiguardian.api.API;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.core.annotation.AliasFor;
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;
/**
* Marks a bean as scoped to the execution of a cucumber scenario.
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Scope(CucumberTestContext.SCOPE_CUCUMBER_GLUE)
@API(status = API.Status.STABLE)
public @interface ScenarioScope {
@AliasFor(
annotation = Scope.class)
ScopedProxyMode proxyMode() default ScopedProxyMode.TARGET_CLASS;
}