Spring中@Value用法

@Value是Spring中用来获取properties/yml配置文件当中配置的值的。

具体用法:

注:Springboot中配置文件加载顺序是:

  1. .properties
  2. .xml
  3. .yml
  4. .yaml

参考资料

posted @ 2021-08-12 17:37  WuLinkedList++  阅读(68)  评论(0)    收藏  举报