solution
The following dependencies need to be added:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
</dependency>
illustrate
When developing microservices, adding bootstrap files to other projects takes effect, but for a new project created today, this file does not take effect.
reason
Since the project is only in the initial development stage, there is no need to join the registration center. For the convenience of development, a springboot web project is directly started. So the appeal package is missing. So the bootstrap file will not take effect. Other projects generally use cloud components, for example, spring-cloud-starter-netflix-eureka-client
this package also includes them spring-cloud-context
.