I would like to disable the rabbit health check in my default RabbitMockConfiguration.
We have a Configuration that is imported via @Import
. Unfortunately the Configuration does not prevent the health check from being added to the health indicator as that happens once spring-rabbit is in the classpath.
We have the workaround, that we add a properties file in every service using that Configuration, which disables the property management.health.rabbit.enabled
, but for us it would be much nicer to be able to disable that heathcheck on configuration level.
I thought about the tests with @TestPropertySource(properties = ["management.health.rabbit.enabled=false"])
, but I could not find an equivalent to use for the a @Configuration
, as @PropertySource
expects a location for a properties file and does not accept single properties.
Any idea what we can do?
Spring boot version: 2.2.4
Spring amqp version: 2.2.3
Spring Version: 5.2.3