What is the difference between putting a property on application.yml or bootstrap.yml in spring boot? In logging.config case, the application works different.
bootstrap.yml or bootstrap.propertiesIt's only used/needed if you're using Spring Cloud and your application's configuration is stored on a remote configuration server (e.g. Spring Cloud Config Server).
From the documentation:
A Spring Cloud application operates by creating a "bootstrap" context, which is a parent context for the main application. Out of the box it is responsible for loading configuration properties from the external sources, and also decrypting properties in the local external configuration files.
Note that the bootstrap.yml or bootstrap.properties can contain additional configuration (e.g. defaults) but generally you only need to put bootstrap config here.
Typically it contains two properties:
spring.cloud.config.uri)spring.application.name)Upon startup, Spring Cloud makes an HTTP call to the config server with the name of the application and retrieves back that application's configuration.
application.yml or application.propertiesContains standard application configuration - typically default configuration since any configuration retrieved during the bootstrap process will override configuration defined here.