Spring中@Value用法

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

具体用法:

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

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

参考资料

おすすめ

転載: blog.csdn.net/weixin_42032770/article/details/119648249