Spring Boot + Yaml + @PropertySource + @ConfigurationProperties + List in Property Source file not injecting

前端 未结 1 836
庸人自扰
庸人自扰 2021-01-14 17:46

I\'m trying to inject external.yml properties into a POJO using @ConfigurationProperties and importing my external.yml file using

相关标签:
1条回答
  • 2021-01-14 17:54

    I believe it has to do with your yml formatting. try this

    external.yml
    
       bla: bkdfjgkdf
       persons:
          -  age: 12
             name: bla1
             args:
               a0: a0dev
               a1: a1dev
               a2: a2dev
          -  age: 12
             name: bla2
             args:
               b0: b0dev
               b1: b1dev
               b2: b2dev
       strings: bla, bla1
    
    0 讨论(0)
提交回复
热议问题