0

I´m developing a Spring Boot Web application and i need to load a YAML properties file which has a list on some fields, for example:

x:
   - 1
   - 2

But when I load the file to the Environment the list is not loaded, instead it flattens the list and loads the properties wrongly. Is there a way to load the YAML file so that the properties are loaded correctly?

  • What does it mean that it loads the properties wrongly? Could you please add an example? – Opal May 17 '18 at 10:38
  • For example, it loads something like this : ´[x:1, 2:null]´, it loads the first value correctly, but then takes the other values as keys with null values – Juan Villalobos May 17 '18 at 15:00
  • I will refer you to @Jose Martinez in this post https://stackoverflow.com/questions/50395985/spring-boot-read-array-from-yaml-properties-file – GabLeg May 17 '18 at 17:30

0 Answers0