'Inside spring-boot--application.yml- what can be the replacement for colon?

application.yml

Pensions : Workplace-DPO: [email protected]

I want Pensions : Workplace-DPO to be as key , but its treating DC Pensions to be as key .

Quotes and square breakets didnt work for me. As an additional info- I am fetching the value like this.

@Value("${Properties.Pensions : workplace-DPO}")
private String PWDPOM;

Do i need to change something here too?



Solution 1:[1]

Include Key with quotes

"LGIMDC Pensions: Workplace-DPO" : [email protected]

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kirill Vizniuk