@Value in Springboot returns null

前端 未结 5 942
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-18 00:22

I have the application.properties, which is located in the resources

apllication.properties

hsm.provider=software
hsm.name=TestHsm
h         


        
5条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-18 01:09

    Okay, i solved it with the top answer of this Question. I put the variables and @Values in the signature of the constructor and not as class variables.

提交回复
热议问题