bootstrap.properties 和 application.properties 有何区别 ?【面试题详解】

今天爱分享给大家带来【面试题详解】之 bootstrap.properties 和 application.properties 有何区别 ,希望给大家带来帮助!
单纯做 Spring Boot 开发,可能不太容易遇到 bootstrap.properties 配置文件,但是在结合 Spring Cloud 时,这个配置就会经常遇到了,特别是在需要加载一些远程配置文件的时侯。
bootstrap.properties 在 application.properties 之前加载,配置在应用程序上下文的引导阶段生效。一般来说我们在 Spring Cloud Config 或者 Nacos 中会用到它。bootstrap.properties 被 Spring ApplicationContext 的父类加载,这个类先于加载 application.properties 的 ApplicatonContext 启动。
当然,前面叙述中的 properties 也可以修改为 yam。

原文链接:https://blog.itblood.com/1765.html,转载请注明出处。
0
女神的最佳交易v3.9 AI修复版[PC+安卓/5.70G/更新]My Best Deal [v3.9] [精品SLG/汉化/动态]
女神的最佳交易v3.9 AI修复版[PC+安卓/5.70G/更新]My Best Deal [v3.9] [精品SLG/汉化/动态]
5分钟前 有人购买 去瞅瞅看

站点公告

显示验证码
没有账号?注册  忘记密码?