Spring Boot has a view of how to build an application using spring: For example, it has a general location for regular profiles, and endpoints for common management and monitoring tasks.
Spring Cloud builds on this and adds features that may be used or occasionally required by all components in the system.
boot the application context: A spring cloud application operates by creating a "bootstrap" context that is the parent context of the main application. Out of the box, responsible for loading configuration properties from external sources, Also decrypts properties in the local external configuration file. environment , which is the source of any spring application's external properties. bootstrap attribute has high precedence, Therefore, the local configuration cannot be overridden by default.
bootstrap.yml application.yml
(or .properties
) Instead of the external configuration of the boot and main context.
Bootstrap.yml
Spring:application:name:foo Cloud:config:uri: ${spring_config_uri:http://localhost:8888}
spring.application.name (in bootstrap.yml
or application.yml
) is a good idea.
You can disable the spring.cloud.bootstrap.enabled=false
boot process completely by setting (for example, in System Properties). Source Source
Spring Cloud Application Context Service