The springboot project I built myself reports an error when I start the project, but I can’t find the relevant configuration information. It is clearly configured in bootstrap.yml , and the application.yml I have been using before. Thinking that the priority of application.yml is not as high as that of bootstrap.yml, the bootstrap configuration file is definitely fine. , the result is that the project can’t live or die.
The SpringBoot project will only recognize application.* configuration files, and will not automatically recognize bootstrap.yml.
The bootstrap.yml configuration is only used in the SpringCloud project. If you want to use the bootstrap.yml in the springboot project, then you need to add the bootstrap starter.
Add bootstrap initiator
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-bootstrap</artifactId> </dependency>
Since SpringCloud is built on SpringBoot, all SpringCloud projects are identified by both kinds of files, and it is only at this time that there is a priority statement that SpringCloud projects are given priority to read bootstrap configuration in reading application configuration.
SpringCloud applications are run based on the context of bootstrap.
- [Solved] SpringBoot Startup Error: Unable to start LiveReload server
- How to Solve Springboot YML configurate logging.level error
- Springboot controls the startup of rabbitmq through configuration files
- How to Fix log4j2 warning: warn unable to identify org.fusesource.jansi.WindowsAnsiOutputStream
- Eclipse relies on spring boot configuration processor, and there is no prompt for writing properties and YML
- [Solved] SpringBoot Create Project and Failed to Access localhost:8080 Error
- [Solved] Project Startup Error: Redis health check failed：Unable to connect to localhost6379
- [Solved] Project Startup Error: Redis health check failed: Unable to connect to localhost6379
- [Solved] Spring Boot Startup Error: Failed to load property source from location ‘classpath:/application-dev.yml‘
- [Solved] SpringBoot Project Startup Error: Field userMapper in com.demo.controller.MemberController required a bean of type ‘c
- Mac project startup error: logback configuration error detected
- Springboot Project: How to Introduces Local Jar Package
- Elasticsearch Startup Error: unable to install syscall filter: java.lang.UnsupportedOperationException: seccomp
- [Solved] Maven Project Packaging Error: Unable to find main class
- [Solved] SpringBoot+Dubbo Startup Error: Fail to start server(url dubbo192.168.0.920880service
- [Solved] nacos Startup Error: Unable to start embedded Tomcat
- How to Solve Spring integrate Seata startup error
- [Solved] SpringBoot+Dubbo Startup Error: Fail to start server(url: dubbo://192.168.0.9:20880/service
- Springboot error about swagger startup [How to Solve]
- SpringBoot—Error starting ApplicationContext. To display the auto-configuration report re-run your a