You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to inject a config param, as shown in the example below, but I'm receiving the following error: '@Configuration' is not applicable to parameter.
public class AppConfig {
private String numberOfThings;
@Inject
public AppConfig(@Configuration("configs.qty.things") String numberOfThings) {
this.numberOfThings = numberOfThings;
}
}
I'm basically trying to obtain the same behavior as with the @Named("someValue") annonation in Guice.
Looking at the @Configuration annonation target I can see only ElementType.FIELD and ElementType.METHOD. No ElementType.PARAMETER is specified. Am I doing something wrong?
The text was updated successfully, but these errors were encountered:
Hey
I'm trying to inject a config param, as shown in the example below, but I'm receiving the following error:
'@Configuration' is not applicable to parameter
.I'm basically trying to obtain the same behavior as with the
@Named("someValue")
annonation in Guice.Looking at the
@Configuration
annonation target I can see only ElementType.FIELD and ElementType.METHOD. No ElementType.PARAMETER is specified. Am I doing something wrong?The text was updated successfully, but these errors were encountered: