I'm trying to upgrade the project that I'm currently working on from Spring Boot 1.2.8 to the latest version (1.4.0). I've discovered, that Spring Boot Actuator since version 1.3.0 exposes Flyway migrations as an Actuator endpoint. This endpoint takes as an argument a single Flyway bean.
My project uses multiple Flyway beans to manage migrations for a number of databases and when I try to start the application, Spring complains about a NoUniqueBeanDefinitionException.
When I disable EndpointAutoconfiguration the context is created correctly. I don't necessarily need the Flyway endpoint at this time, but there are other endpoints that we do use for monitoring, so I don't want to disable all of the endpoints. I've tried to disable the flyway endpoint in the application.properties file using
endpoints.flyway.enabled=false
but Spring still complains (I think it tries to create the endpoint bean anyway and the 'enabled' property is used to determine the availability of the endpoint at runtime).
I think currently my only option is to manually enable the endpoints that I need and disable autoconfiguration. Is that right?
And also, is there a reason, why the FlywayEndpoint only works with a single Flyway bean present? For what I understand, the constructor could just take a list of Flyway beans, the invoke() method could then iterate over them.