在前面的文章基础上
https://blog.csdn.net/zlpzlpzyd/article/details/136060312
日志配置
logback-spring.xml
%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} [%thread] %logger{50} %caller{1} - %msg%n
如果引用了 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 优先。