0
我希望能够做的是:是否可以读取YAML财产到使用Spring和@Value标注地图
YAML:
features:
feature1: true
feature2: false
feature3: true
代码:
@Value("${features}")
private Map<String,Boolean> features;
我无法弄清楚使用什么Spring脚本语法来完成此操作(如果可能的话)
[春季启动的可能的复制 - 注入从application.yml映射](https://stackoverflow.com/questions/24917194/spring-boot-inject-map-from-application-yml) –