Reading values from application.properties Spring Boot

后端 未结 10 1746
无人及你
无人及你 2021-01-18 10:46

My Spring boot app has this application structure:

  • src
    • main
      • java
      • resources
        • application.properties
      <
10条回答
  •  独厮守ぢ
    2021-01-18 11:41

    Probably not the exact solution you're looking for, but you can also declare a property source bean:

    https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/PropertySource.html

提交回复
热议问题