配置文件
文章平均质量分 86
GG123_MM
这个作者很懒,什么都没留下…
展开
-
@Value的使用
@Value@ConfigurationProperties与@Value.yml文件——.properties文件(两种配置文件中引入属性值得方式有所不同).yml格式不支持使用注解@PropertySource导入配置读取属性值:—支持另种方式读取@@@方式一:SpEL表达式方式读取配置项:@Value("#{configProoerties['key']}")例:@Value("#{configProoerties['user.name']}")String name;@@@原创 2021-05-30 15:49:09 · 1986 阅读 · 0 评论 -
SpringBoot配置文件 application
SpringBoot配置文件 application一、比较配置文件Bootstrap和ApplicationSpringBoot中有两种配置文件:bootstrap(.yml或者.properties)和application(.yml或者.properties)他们的区别如下:**加载顺序:**Bootstrap是应用程序的 父 上下文,属于引导配置,由父ApplicationContext加载。Bootstrap优先于Application加载。**Bootstrap属性不可被覆盖:**Bo原创 2021-05-30 12:14:49 · 959 阅读 · 0 评论