Spring Boot: Load @Value from YAML file

前端 未结 6 1815
一整个雨季
一整个雨季 2020-12-28 14:23

I need to load a property from a .yml file, which contains the path to a folder where the application can read files from.

I\'m using the following code

6条回答
  •  独厮守ぢ
    2020-12-28 15:04

    For me a duplicate key in the property file caused this...

    I used same key unknowingly in large yml file.

    key:   
     key1: value
     key2: value
    
    key:  
     key3: value
    

提交回复
热议问题