spring-cloud / spring-cloud/spring-cloud-commons
Startup info not logged when bootstrap is being used
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 751
- Forks
- 744
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
The startup info messages should appear regardless of the existence of a bootstrap being utilitzed.
This code in SpringApplication#prepareContext inhibits the logStartupInfo(boolean).
if (this.logStartupInfo) {
this.logStartupInfo(context.getParent() == null);
this.logStartupProfileInfo(context);
}
context.getParent() is the bootstrap context when this dependency is included. It is null otherwise.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-kubernetes-fabric8-config</artifactId>
</dependency>
I am using
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.8</version>
<relativePath/>
</parent>
with these related versions
<spring-cloud-gcp.version>3.2.1</spring-cloud-gcp.version>
<spring-cloud.version>2021.0.0</spring-cloud.version>
spring-cloud-starter-kubernetes-fabric8-config ends up being version 2.1.0
Example, minimal project.
StartupInfoNotShowing.zip
Apparently, it is due to this code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SpringApplication#prepareContext and the referenced BootstrapApplicationListener code in spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/BootstrapApplicationListener.java. Reproduce the behavior with the provided StartupInfoNotShowing.zip minimal project and verify that startup info messages appear both with and without the bootstrap dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100