lbruun-net / Pre-Liquibase

Spring Boot add-on to Liquibase
Apache License 2.0
49 stars 9 forks source link

Incompatible with Spring Boot 3.4.0 #35

Open candrews opened 9 hours ago

candrews commented 9 hours ago

Spring Boot 3.4.0 was released yesterday: https://spring.io/blog/2024/11/21/spring-boot-3-4-0-available-now

Projects using Pre-Liquibase and Spring Boot 3.4.0 fail to start with this error:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    net.lbruun.springboot.preliquibase.PreLiquibaseAutoConfiguration$DefaultPreLiquibaseDataSourceProvider.<init>(PreLiquibaseAutoConfiguration.java:216)

The following method did not exist:

    'liquibase.integration.spring.SpringLiquibase org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration$LiquibaseConfiguration.liquibase(org.springframework.beans.factory.ObjectProvider, org.springframework.beans.factory.ObjectProvider, org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties, org.springframework.boot.autoconfigure.liquibase.LiquibaseConnectionDetails)'

The calling method's class, net.lbruun.springboot.preliquibase.PreLiquibaseAutoConfiguration$DefaultPreLiquibaseDataSourceProvider, was loaded from the following location:

    jar:file:/home/candrews/.gradle/caches/modules-2/files-2.1/net.lbruun.springboot/preliquibase-spring-boot-autoconfigure/1.5.1/87c14b1dc682b7802c903fb20200f7419e189d73/preliquibase-spring-boot-autoconfigure-1.5.1.jar!/net/lbruun/springboot/preliquibase/PreLiquibaseAutoConfiguration$DefaultPreLiquibaseDataSourceProvider.class

The called method's class, org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration$LiquibaseConfiguration, is available from the following locations:

    jar:file:/home/candrews/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/3.4.0/2cf78b01be25952c96cb8ee60b4b0562b3a136f2/spring-boot-autoconfigure-3.4.0.jar!/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class

The called method's class hierarchy was loaded from the following locations:

    org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration.LiquibaseConfiguration: file:/home/candrews/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/3.4.0/2cf78b01be25952c96cb8ee60b4b0562b3a136f2/spring-boot-autoconfigure-3.4.0.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes net.lbruun.springboot.preliquibase.PreLiquibaseAutoConfiguration$DefaultPreLiquibaseDataSourceProvider and org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration$LiquibaseConfiguration

The signature of LiquibaseAutoConfiguration.LiquibaseConfiguration.liquibase has changed - the commit that made the change is https://github.com/spring-projects/spring-boot/commit/6aeab4461e7fb821c3954efe5efdaec0885cd3f6#diff-3690614f74b4c856a949f9746fd77a870c9d32fc90ade726e515780a17c65a2aL101

alessiomatricardi commented 8 hours ago

+1, seems that org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration.LiquibaseConfiguration#liquibase here has changed and has package access