-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed
Description
I have a microservices-based mono-repo with multiple spring-boot applications. I would like to use Spring Boot Docker Compose support to start the dependent services. There are few services (ex: db) that are specific to each service and there are some services (ex: RabbitMQ) shared by multiple services.
All the microservices dependencies are defined in a single compose.yml
fil. If I start any one microservice it starts all the services defined in the compose.yml file, which is ok for me.
version: "3.8"
services:
catalog-db:
image: postgres:16-alpine
...
orders-db:
image: postgres:16-alpine
...
rabbitmq:
image: rabbitmq:3.12.11-management
...
But the problem is, when I have multiple databases defined for different services, Flyway initialization fails.
Parameter 0 of method flyway in org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration required a single bean, but 2 were found:
- flywayConnectionDetailsForCatalogDb: defined in unknown location
- flywayConnectionDetailsForOrdersDb: defined in unknown location
Is there a way to configure at the microservice level (using spring.docker.compose.*
properties) to take only certain services into account?
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug