My application.yaml
has a map of values stored in a yaml file.
app:
myMap:
key1: value1
key2: value2
key3: value3
Configuration class:
@Data
@ApplicationScoped
public class AppConfiguration {
@ConfigProperty(name = "app.myMap")
private Map<String, String> myMap;
}
This results in the following error:
javax.enterprise.inject.spi.DeploymentException: No config value of type [java.util.Map] exists for: app.myMap
I'm unable to read these values because MicroProfile does not support java.util.Map
. I came across this mailing list that suggests a workaround but being rather new to Quarkus, I'm unsure of how to implement this properly. It's also a year old and I'm wondering if there is a better implementation then what was suggested in that mailing list.