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,一经查实,立即删除!

相关文章

搭建kafka测试环境

搭建kafka测试环境 启动zookeeper docker pull bitnami/zookeeperdocker run -d --name zookeeper \-e ALLOW_ANONYMOUS_LOGINyes \bitnami/zookeeper:latest启动kafka 创建网络与连接 docker network create kafka-network docker network connect kafka-network zookeepe…

【小程序】基础API之系统API接口汇总

ty.env 环境变量 属性 USER_DATA_PATH string 文件系统中的用户目录路径 (本地路径)&#xff0c;当操作文件时需使用此目录。 // 写入一个文件 const fileManager await ty.getFileSystemManager(); const fileRoot ty.env.USER_DATA_PATH; const filePath ${fileRoot}…

探索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;揭示了减少延迟、增强隐私和高效网络利用等好处。 随着传感器和可穿戴设备等物联网设备的数…

【jQuery——详细讲解】

jQuery讲解 jQuery介绍 jQuery介绍 jQuery是一个快速、小巧且功能丰富的JavaScript库&#xff0c;它使得HTML文档遍历和操作、事件处理、动画和Ajax操作变得更简单&#xff0c;都是通过一个简洁的API来实现的&#xff0c;这个API在多种浏览器上都能正常工作。它的口号是“writ…

Unity UGUI实现点击事件穿透

代码很简单如下 将此代码挂载到上层节点上即可 using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems;public class ClickEventPenetration : MonoBehaviour, IPointerClickHandler {public void OnPointerClick(PointerEventData eventData…

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;直…

cmake安装LAMMPS增加MOLECULE等package

使用cmake可以较make更加快捷的安装LAMMPS,关于官网上已有Cmake安装的详细教程&#xff1a; https://docs.lammps.org/Build_cmake.html 可是经过使用&#xff0c;发现默认的安装方式里只有最基础的包&#xff0c;甚至没有MOLECULE包 因此为了使用cmake来增加想要安装的包&a…

代码随想录算法训练营第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 框架&#…

c# DataTable 帮助类

public class DataTableHelper { #region DataTable转IList /// <summary> /// DataTable转IList集合 /// </summary> /// <typeparam name"T"></typeparam> /// <param name"dataTabl…

linux查看公网地址

curl ifconfig.mewget -qO- ifconfig.me

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

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

C#的Char 结构的像IsLetterOrDigit(Char)等常见的方法

目录 一、Char 结构的方法 二、Char.IsLetterOrDigit 方法 1.Char.IsLetterOrDigit(Char)用法 2.IsLetterOrDigit(String, Int32)方法 三、Char.IsLetter 方法 1.IsLetter(Char) 2.IsLetter(String, Int32) 四、Char.IsDigit 方法 1. IsDigit(String, Int32) 2.IsDig…

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

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