Created
June 1, 2020 03:45
-
-
Save ahwinemman/82aa59ba26c5308dfec73bb3f854b6af to your computer and use it in GitHub Desktop.
This annotation allows us inject string properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javaee.injectprops.annotations; | |
import javax.enterprise.util.Nonbinding; | |
import javax.inject.Qualifier; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.Target; | |
import static java.lang.annotation.ElementType.FIELD; | |
import static java.lang.annotation.ElementType.METHOD; | |
import static java.lang.annotation.ElementType.PARAMETER; | |
import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
@Qualifier | |
@Retention(RUNTIME) | |
@Target({FIELD, METHOD, PARAMETER}) | |
public @interface StringProperty { | |
@Nonbinding public String value() default ""; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment