79415327

Date: 2025-02-05 15:47:06
Score: 0.5
Natty:
Report link

By running some tests, I found out that although I tried to specify the datasource in the application.properties, so it had no conflict when trying to select one for the liquibase bean, it was still detecting it somehow. I could prove, although only through trial and error, that it was due to the following plugin:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-docker-compose</artifactId>
    <scope>runtime</scope>
</dependency>

When I ran my app with IntelliJ, the compose was also executed, which I found great, but the "autoconfiguration" between the containers and the app made it detect the new datasource without desiring it at all.

Although I can make it work, at least for now, I still think that I lack for a way of, If I add the plugin back again, suppress the spring autoconfiguration for datasources and implement my own.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Fran Pedreira