Is there a way to insert spring properties (key or value) exactly into annotation value[Spring]

Viewed 154

I want to inject spring properties into Annotation but I can't do it directly. I have annotation :

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
@StepDefAnnotation
@Documented
public @interface When {
    String value();

    long timeout() default 0L;
}

And I want to insert it like this @When(value="some.value.from.properties") or like this @When(value=@Value("some.value.from.properties"))

0 Answers
Related