spring-boot

Springboot

techzealot
springboot知识总结 bootstrap phase bootstrap阶段是springboot中为应用容器准备启动环境的阶段。该阶段最先运行,会产生BootstrapContext,为ApplicationContext准备配置文件,加载其他需要资源。BootstrapContext为ApplicationContext的父容器,其中的配置属性和Bean对于子容器均可见。该阶段会读取bootstrap.yml(properties)配置文件并存储于BootstrapContext,以便与ApplicationContext相关配置隔离。 应用: 配置远程配置中心地址并从中获取应用配置,如Apollo和spring cloud config 可以作为测试上下文所需资源的承载环境,如**testcontainers-spring-boot** 注意事项: