Allow embedded config server to be disabled
When embedding Config Server in an application, it should be possible to disable loading configuration from an external source unless the app deployer explicitly defines an EnvironmentRepository configuration (e.g. in a bootstrap.yml file provided in a spring.cloud.bootstrap.location outside of the deployed application jar file).
Currently this is difficult to do. If no configuration is provided, the default is to use a git repository but this will fail to load because a spring.cloud.config.server.git.uri is required. You can provide a native repository with a dummy location as a default, but this must be done with a composite type to allow alternative repositories to override this default.
I have opened PR #3365 to address this issue.
The change introduces the spring.cloud.config.server.default-repository.enabled property, allowing the default Git environment repository to be disabled when set to false, while preserving the existing behavior by default.
I have also added a test to verify that the default repository is not created when disabled.