My application.yaml is like so:
Код: Выделить всё
env: emails: a: 0 # works, the rest don't b.com: 0 c.com: 1 "d.com": 0 'e.com': 1 "[f.com]": 0 '[g.com]': 1 Код: Выделить всё
@ConfigurationProperties("env") public class Configurator { private Map emails; public Map getEmails() { return emails; } public void setEmails( @MapFormat(keyFormat = StringConvention.RAW) Map emails) { this.emails = emails; } } Код: Выделить всё
Map emailsКод: Выделить всё
a : 0I've already tried
Код: Выделить всё
@MapFormat(keyFormat = StringConvention.RAW)Alternatively, this
Код: Выделить всё
application.ymlКод: Выделить всё
MapКод: Выделить всё
@ConfigurationPropertiesКод: Выделить всё
TypeConverterКод: Выделить всё
env: emails: - key: a.com - value: 0 Источник: https://stackoverflow.com/questions/781 ... h-micronau
Мобильная версия