spring boot和spring cloud项目中配置文件application和bootstrap加载顺序

在前面的文章基础上

https://blog.csdn.net/zlpzlpzyd/article/details/136060312

日志配置

logback-spring.xml

<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="10000000 seconds" debug="false"><conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /><!-- 定义日志的根目录 --><!-- 控制台输出 --><appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"><encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"><!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--><pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} [%thread] %logger{50} %caller{1} - %msg%n</pattern></encoder></appender><!--logger主要用于存放日志对象,也可以定义日志类型、级别name:表示匹配的logger类型前缀,也就是包的前半部分level:要记录的日志级别,包括 TRACE < DEBUG < INFO < WARN < ERRORadditivity:作用在于children-logger是否使用 rootLogger配置的appender进行输出,false:表示只用当前logger的appender-ref,true:表示当前logger的appender-ref和rootLogger的appender-ref都有效--><!-- logger Spring framework --><!--<logger name="org.springframework" level="debug"></logger>--><logger name="org.springframework.boot.context.config" level="trace"></logger><logger name="feign" level="debug"></logger><!--<logger name="com.netflix" level="debug"></logger>--><!--<logger name="rx" level="debug"></logger>--><logger name="com.alibaba" level="debug"></logger><!--root与logger是父子关系,没有特别定义则默认为root,任何一个类只会和一个logger对应,要么是定义的logger,要么是root,判断的关键在于找到这个logger,然后判断这个logger的appender和level。--><root level="INFO"><appender-ref ref="STDOUT"/></root>
</configuration>

如果引用了 spring cloud 的组件且有 bootstrap 和 application 相关文件,启动日志如下

2024-02-07 09:26:45.355 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.properties' (file:./config/bootstrap.properties)
2024-02-07 09:26:45.356 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.xml' (file:./config/bootstrap.xml)
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.yml' (file:./config/bootstrap.yml)
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.yaml' (file:./config/bootstrap.yaml)
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.properties' (file:./bootstrap.properties)
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.xml' (file:./bootstrap.xml)
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.yml' (file:./bootstrap.yml)
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.yaml' (file:./bootstrap.yaml)
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.properties
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.xml
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.yml
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.yaml
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap.properties
2024-02-07 09:26:45.357 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap.xml
2024-02-07 09:26:45.358 DEBUG 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:222)- Loaded config file 'file:/E:/personal/feign-example/provider/target/classes/bootstrap.yml' (classpath:/bootstrap.yml)
2024-02-07 09:26:45.358 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap.yaml
2024-02-07 09:26:45.358 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap-default.properties' (file:./config/bootstrap-default.properties) for profile default
2024-02-07 09:26:45.358 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap-default.properties' (file:./config/bootstrap-default.properties) for profile default
2024-02-07 09:26:45.358 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.properties' (file:./config/bootstrap.properties) for profile default
2024-02-07 09:26:45.358 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap-default.xml' (file:./config/bootstrap-default.xml) for profile default
2024-02-07 09:26:45.358 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap-default.xml' (file:./config/bootstrap-default.xml) for profile default
2024-02-07 09:26:45.358 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.xml' (file:./config/bootstrap.xml) for profile default
2024-02-07 09:26:45.358 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap-default.yml' (file:./config/bootstrap-default.yml) for profile default
2024-02-07 09:26:45.358 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap-default.yml' (file:./config/bootstrap-default.yml) for profile default
2024-02-07 09:26:45.358 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.yml' (file:./config/bootstrap.yml) for profile default
2024-02-07 09:26:45.358 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap-default.yaml' (file:./config/bootstrap-default.yaml) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap-default.yaml' (file:./config/bootstrap-default.yaml) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.yaml' (file:./config/bootstrap.yaml) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap-default.properties' (file:./bootstrap-default.properties) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap-default.properties' (file:./bootstrap-default.properties) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.properties' (file:./bootstrap.properties) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap-default.xml' (file:./bootstrap-default.xml) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap-default.xml' (file:./bootstrap-default.xml) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.xml' (file:./bootstrap.xml) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap-default.yml' (file:./bootstrap-default.yml) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap-default.yml' (file:./bootstrap-default.yml) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.yml' (file:./bootstrap.yml) for profile default
2024-02-07 09:26:45.359 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap-default.yaml' (file:./bootstrap-default.yaml) for profile default
2024-02-07 09:26:45.360 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap-default.yaml' (file:./bootstrap-default.yaml) for profile default
2024-02-07 09:26:45.360 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.yaml' (file:./bootstrap.yaml) for profile default
2024-02-07 09:26:45.360 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap-default.properties for profile default
2024-02-07 09:26:45.360 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap-default.properties for profile default
2024-02-07 09:26:45.360 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.properties for profile default
2024-02-07 09:26:45.360 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap-default.xml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap-default.xml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.xml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap-default.yml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap-default.yml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.yml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap-default.yaml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap-default.yaml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.yaml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap-default.properties for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap-default.properties for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap.properties for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap-default.xml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap-default.xml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap.xml for profile default
2024-02-07 09:26:45.361 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap-default.yml for profile default
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap-default.yml for profile default
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap-default.yaml for profile default
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap-default.yaml for profile default
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap.yaml for profile default
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.properties' (file:./config/bootstrap.properties)
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.xml' (file:./config/bootstrap.xml)
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.yml' (file:./config/bootstrap.yml)
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/bootstrap.yaml' (file:./config/bootstrap.yaml)
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.properties' (file:./bootstrap.properties)
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.xml' (file:./bootstrap.xml)
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.yml' (file:./bootstrap.yml)
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./bootstrap.yaml' (file:./bootstrap.yaml)
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.properties
2024-02-07 09:26:45.362 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.xml
2024-02-07 09:26:45.363 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.yml
2024-02-07 09:26:45.363 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/bootstrap.yaml
2024-02-07 09:26:45.363 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap.properties
2024-02-07 09:26:45.363 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap.xml
2024-02-07 09:26:45.363 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/bootstrap.yaml.   ____          _            __ _ _/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/  ___)| |_)| | | | | || (_| |  ) ) ) )'  |____| .__|_| |_|_| |_\__, | / / / /=========|_|==============|___/=/_/_/_/:: Spring Boot ::       (v2.3.12.RELEASE)2024-02-07 09:26:46.886  INFO 11872 [main] c.e.feign.provider.FeignExampleProviderApplication Caller+0	 at org.springframework.boot.SpringApplication.logStartupProfileInfo(SpringApplication.java:648)- No active profile set, falling back to default profiles: default
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.properties' (file:./config/application.properties)
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.xml' (file:./config/application.xml)
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.yml' (file:./config/application.yml)
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.yaml' (file:./config/application.yaml)
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.properties' (file:./application.properties)
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.xml' (file:./application.xml)
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.yml' (file:./application.yml)
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.yaml' (file:./application.yaml)
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.properties
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.xml
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.yml
2024-02-07 09:26:46.893 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.yaml
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped unloaded config 'file:/E:/personal/feign-example/provider/target/classes/application.properties' (classpath:/application.properties)
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application.xml
2024-02-07 09:26:46.894 DEBUG 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:222)- Loaded config file 'file:/E:/personal/feign-example/provider/target/classes/application.yml' (classpath:/application.yml)
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application.yaml
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application-default.properties' (file:./config/application-default.properties) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application-default.properties' (file:./config/application-default.properties) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.properties' (file:./config/application.properties) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application-default.xml' (file:./config/application-default.xml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application-default.xml' (file:./config/application-default.xml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.xml' (file:./config/application.xml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application-default.yml' (file:./config/application-default.yml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application-default.yml' (file:./config/application-default.yml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.yml' (file:./config/application.yml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application-default.yaml' (file:./config/application-default.yaml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application-default.yaml' (file:./config/application-default.yaml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.yaml' (file:./config/application.yaml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application-default.properties' (file:./application-default.properties) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application-default.properties' (file:./application-default.properties) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.properties' (file:./application.properties) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application-default.xml' (file:./application-default.xml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application-default.xml' (file:./application-default.xml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.xml' (file:./application.xml) for profile default
2024-02-07 09:26:46.894 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application-default.yml' (file:./application-default.yml) for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application-default.yml' (file:./application-default.yml) for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.yml' (file:./application.yml) for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application-default.yaml' (file:./application-default.yaml) for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application-default.yaml' (file:./application-default.yaml) for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.yaml' (file:./application.yaml) for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application-default.properties for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application-default.properties for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.properties for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application-default.xml for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application-default.xml for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.xml for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application-default.yml for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application-default.yml for profile default
2024-02-07 09:26:46.895 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.yml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application-default.yaml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application-default.yaml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.yaml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application-default.properties for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application-default.properties for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped unloaded config 'file:/E:/personal/feign-example/provider/target/classes/application.properties' (classpath:/application.properties) for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application-default.xml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application-default.xml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application.xml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application-default.yml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application-default.yml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application-default.yaml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application-default.yaml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application.yaml for profile default
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.properties' (file:./config/application.properties)
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.xml' (file:./config/application.xml)
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.yml' (file:./config/application.yml)
2024-02-07 09:26:46.896 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./config/application.yaml' (file:./config/application.yaml)
2024-02-07 09:26:46.897 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.properties' (file:./application.properties)
2024-02-07 09:26:46.897 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.xml' (file:./application.xml)
2024-02-07 09:26:46.897 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.yml' (file:./application.yml)
2024-02-07 09:26:46.897 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config 'file:./application.yaml' (file:./application.yaml)
2024-02-07 09:26:46.897 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.properties
2024-02-07 09:26:46.897 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.xml
2024-02-07 09:26:46.897 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.yml
2024-02-07 09:26:46.897 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/config/application.yaml
2024-02-07 09:26:46.897 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped unloaded config 'file:/E:/personal/feign-example/provider/target/classes/application.properties' (classpath:/application.properties)
2024-02-07 09:26:46.897 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application.xml
2024-02-07 09:26:46.897 TRACE 11872 [main] o.s.b.context.config.ConfigFileApplicationListener Caller+0	 at org.springframework.boot.logging.DeferredLog.logTo(DeferredLog.java:219)- Skipped missing config classpath:/application.yaml

如果 bootstrap 相关文件存在,先加载,然后再加载 application 相关文件。对应引用了 spring cloud 组件。

如果 bootstrap 相关文件不存在,加载 application 相关文件。对应未引用 spring cloud 组件。

不过在启动过程中在扫描 classpath 下如果存在接口 ApplicationListener 的实现类,则会进行排序处理。

最终相关的配置内容加载到 AbstractApplicationContext 中的变量 environment 中进行全局配置处理。

如果同一个文件名有不同的后缀,但是配置值一致加载顺序如何?

ConfigFileApplicationListener 中逻辑如下

其中,变量值 propertySourceLoaders 通过 SpringFactoriesLoader 加载 classpath 下 META-INF/spring.factories 中 org.springframework.boot.env.PropertySourceLoader 对应的类

具体有 PropertiesPropertySourceLoader 和 YamlPropertySourceLoader。

PropertiesPropertySourceLoader 用于加载后缀为 .properties 的文件。

YamlPropertySourceLoader 用于加载后缀为 .yml 或者 .yaml 的文件。

如果对应的配置在后缀为 properties 和 yml 的文件中都存在,则 properties 优先。

ConfigFileApplicationListener 按顺序读取自动配置,在进行遍历时按序遍历,所以 properties 优先。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/674373.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

探索C语言中的联合体与枚举:数据多面手的完美组合!

​ ✨✨ 欢迎大家来到贝蒂大讲堂✨✨ &#x1f388;&#x1f388;养成好习惯&#xff0c;先赞后看哦~&#x1f388;&#x1f388; 所属专栏&#xff1a;C语言学习 贝蒂的主页&#xff1a;Betty‘s blog 1. 联合体的定义 联合体又叫共用体&#xff0c;它是一种特殊的数据类型&…

2024智慧城市新纪元:引领未来,重塑都市生活

随着科技的飞速发展和数字化转型的不断深入&#xff0c;2024年智慧城市领域迎来了全新的发展格局。 这一年&#xff0c;智慧城市的建设更加注重人性化、可持续性和创新性&#xff0c;为城市居民带来了前所未有的便捷与舒适。以下将重点关注智慧城市的几个核心内容&#xff0c;…

《幻兽帕鲁》攻略:0基础入门及游戏基础操作 幻兽帕鲁基础设施 幻兽帕鲁基础攻击力 Mac苹果电脑玩幻兽帕鲁 幻兽帕鲁加班加点

今天就跟大家聊聊《幻兽帕鲁》攻略&#xff1a;0基础入门及游戏基础操作。 如果想在苹果电脑玩《幻兽帕鲁》记得安装CrossOver哦。 以下纯干货&#xff1a; CrossOver正版安装包&#xff08;免费试用&#xff09;&#xff1a;https://souurl.cn/Y1gDao 一、基础操作 二、界面…

Logback - 日志框架

引言 在当今的企业级应用开发中&#xff0c;日志管理是一个不可或缺的部分。它不仅帮助我们进行错误跟踪&#xff0c;还能有效监控应用程序的运行状态&#xff0c;为性能优化提供数据支撑。Spring Boot作为一个简化Spring应用开发的框架&#xff0c;自带了强大的日志管理功能。…

雾计算:去中心化计算的未来之旅

雾计算是去中心化计算的基石&#xff0c;它将重塑我们的数字格局。通过使计算和存储更接近数据源&#xff0c;它改变了我们处理物联网生成数据的方式。通过雾计算探索未来&#xff0c;揭示了减少延迟、增强隐私和高效网络利用等好处。 随着传感器和可穿戴设备等物联网设备的数…

PCIe学习笔记(1)Hot-Plug机制

文章目录 Hot-Plug InitHot Add FlowSurprise Remove FlowNPEM Flow Hot-Plug Init PCIe hot-plug是一种支持在不关机情况下从支持的插槽添加或删除设备的功能&#xff0c;PCIe架构定义了一些寄存器以支持原生热插拔。相关寄存器主要分布在Device Capabilities, Slot Capabili…

网站被攻击有什么办法呢?

最近&#xff0c;德迅云安全遇到不少网站用户遇到攻击问题&#xff0c;来咨询安全解决方案。目前在所有的网络攻击方式中&#xff0c;DDoS是最常见&#xff0c;也是最高频的攻击方式之一。不少用户网站上线后&#xff0c;经常会遭受到攻击的困扰。有些攻击持续时间比较短影响较…

MCU+SFU视频会议一体化,视频监控,指挥调度(AR远程协助)媒体中心解决方案。

视频互动应用已经是政务和协同办公必备系统&#xff0c;早期的分模块&#xff0c;分散的视频应该不能满足业务需要&#xff0c;需要把视频监控&#xff0c;会议&#xff0c;录存一体把视频资源整合起来&#xff0c;根据客户需求&#xff0c;需要能够多方视频互动&#xff0c;直…

代码随想录算法训练营第29天|491.递增子序列 * * 46.全排列 * 47.全排列 II

文章目录 491.递增子序列思路&#xff1a;代码 思路&#xff1a;优化代码&#xff1a; 46.全排列思路代码一&#xff1a;使用used数组代码二&#xff1a;使用path判断元素 47.全排列 II思路一&#xff1a;层节点和路径都是用used数组做记录思路二&#xff1a;层通过排序后是否重…

学习Vue3的第一天

目录 简介 什么是 Vue&#xff1f; 创建Vue3工程 前提条件 基于 vue-cli 创建&#xff08;不推荐&#xff09; 基于 vite 创建&#xff08;推荐&#xff09; 通过 CDN 使用 Vue 代码示例 简介 什么是 Vue&#xff1f; Vue.js 是一个流行的前端 JavaScript 框架&#…

用keytool 生成JWT的RSA非对称密钥

写在前面 JWT 令牌 可以由 X.509 证书或 256 位非对称密钥签名来充当&#xff0c;为了获得合法的JWT 令牌&#xff0c;我们可以使用JDK中的keytool.exe工具来生成。 本例的操作环境是Windows系统&#xff0c;操作的前置条件需要先安装好JDK&#xff0c;并配置好环境变量&…

Vue 学习随笔系列九 -- 表格中插入图片、背景、自定义表头

表格中插入图片和icon 文章目录 表格中插入图片和icon一、如何插入图片1、代码2、效果 二、文字添加背景1、代码2、效果 三、表头悬浮提示语四、表头添加图标 一、如何插入图片 1、代码 <template><div><el-tablesize"small"borderv-loading"l…

K8S部署Harbor镜像仓库(含离线安装包harbor-offline-installer国内下载链接)

天行健&#xff0c;君子以自强不息&#xff1b;地势坤&#xff0c;君子以厚德载物。 每个人都有惰性&#xff0c;但不断学习是好好生活的根本&#xff0c;共勉&#xff01; 文章均为学习整理笔记&#xff0c;分享记录为主&#xff0c;如有错误请指正&#xff0c;共同学习进步。…

面向智算服务,构建可观测体系最佳实践

作者&#xff1a;蓟北 构建面向 AI、大数据、容器的可观测体系 &#xff08;一&#xff09;智算服务可观测概况 对于越来越火爆的人工智能领域来说&#xff0c;MLOps 是解决这一领域的系统工程&#xff0c;它结合了所有与机器学习相关的任务和流程&#xff0c;从数据管理、建…

Qt程序设计-读写CSV文件

本文实例演示Qt读写CSV文件实现 创建项目 添加两个按钮和一个显示路径的label 界面如下 UI界面 <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"><class>MainWindow</class><widget class="QM…

[BUUCTF]-PWN:[极客大挑战 2019]Not Bad解析

保护 ida 这里使用mmap函数创造了一个内存映射区域 从地址0x123000开始&#xff0c;大小位0x1000 权限为可写可执行&#xff08;可读0x1&#xff0c;可写0x2&#xff0c;可执行0x3&#xff09; 设置为私有映射&#xff08;MAP_PRIVATE&#xff09;和匿名映射&#xff08;MAP…

【buuctf--被偷走的文件】

将 ftp 流量过滤下来&#xff0c;追踪 ftp 流量&#xff0c;得到下图 先解释一下这四行什么意思&#xff1a; PASV&#xff1a; 这是FTP的命令&#xff0c;用于告知服务器在数据连接中使用被动模式&#xff08;Passive Mode&#xff09;。在被动模式下&#xff0c;数据连接的…

Java Stram 流对于返回对象的处理 (结束流)

Java Stram 流对于返回对象的处理 &#xff08;结束流&#xff09; package com.zhong.streamdemo.showdownstreamdemo;import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor;import java.util.*; import java.util.stream.Collectors; im…

【golang】24、go get 和 go mod:indrect 与 go mod tidy

文章目录 go get 会执行如下操作&#xff1a; 操作 go.mod 文件&#xff08;add、update、remove&#xff09;下载依赖到 $GOPATH/pkg/mod 中若已安装&#xff0c;则更新该包&#xff0c;到最新版本 试验前置准备&#xff1a;首先删除已下载的依赖&#xff0c;rm -rf $GOPATH…

MySQL篇----第十四篇

系列文章目录 文章目录 系列文章目录前言一、MySQL 数据库作发布系统的存储,一天五万条以上的增量,预计运维三年,怎么优化?二、锁的优化策略三、索引的底层实现原理和优化四、什么情况下设置了索引但无法使用前言 前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽…