I playing with the mpConfig-1.2 feature, but it seems to not work in my setup.
Using Liberty 18.0.0.2.
Have added the maven dependency for microprofile-config-api, CDI is working fine, but the @ConfigProperty is failing at startup with the message
[ERROR ] CWWKZ0106E: Could not start web application demo-service-ear {1.0-SNAPSHOT}.
[ERROR ] CWWKZ0004E: An exception occurred while starting the application demo-service-ear {1.0-SNAPSHOT}. The exception message was: com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type String with qualifiers @ConfigProperty
at injection point [BackedAnnotatedField] @Inject @ConfigProperty private no.klp.bpm.task.KOPSTask.endpoint2
at no.klp.bpm.task.KOPSTask.endpoint2(KOPSTask.java:0)
The annotation is like this:
@Inject
@ConfigProperty(name="rule.engine.host", defaultValue="ukjent!")
private String endpoint2;
What can be possible wrong here ?
/bwa