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) –