Spring Cloud how to exclude BootstrapConfiguration

Viewed 684

Is there a way to exclude a specific BootstrapConfiguration declared in a META-INF/spring.factories file with the org.springframework.cloud.bootstrap.BootstrapConfiguration key?

I wasn't able to find any documentation about it, even though I see the org.springframework.cloud.bootstrap.BootstrapConfiguration annotation has an exclude field, it is not clear to me exactly how it should be used.

2 Answers

According to the class you want to exclude you can set the following to disable it

spring.cloud.azure.appconfiguration.enabled=false

It is simple in spring boot. If application your file location is "/src/main/resources/bootstrap.yml" then it is automatically execute when your application start.

enter image description here

Related