From feaa2f90d8311334d2ec0324209ff6755969a0c8 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Tue, 5 Mar 2024 11:43:37 +0100 Subject: [PATCH] Skip `SpringLiquibase` in `DatabaseComponentAndBeanInitializationOrdering` (#505) Fixes https://github.com/openrewrite/rewrite-spring/issues/504 --- .../DatabaseComponentAndBeanInitializationOrdering.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/openrewrite/java/spring/boot2/DatabaseComponentAndBeanInitializationOrdering.java b/src/main/java/org/openrewrite/java/spring/boot2/DatabaseComponentAndBeanInitializationOrdering.java index 12c8e6119..0abe423ca 100644 --- a/src/main/java/org/openrewrite/java/spring/boot2/DatabaseComponentAndBeanInitializationOrdering.java +++ b/src/main/java/org/openrewrite/java/spring/boot2/DatabaseComponentAndBeanInitializationOrdering.java @@ -62,12 +62,13 @@ public TreeVisitor getVisitor() { new AnnotationMatcher("@org.springframework.boot.test.context.TestComponent")); List wellKnowDataSourceTypes = Arrays.asList( - "org.springframework.jdbc.core.JdbcTemplate", + "javax.persistence.EntityManagerFactory", + "liquibase.integration.spring.SpringLiquibase", "org.jooq.DSLContext", + "org.springframework.jdbc.core.JdbcTemplate", "org.springframework.jdbc.core.JdbcOperations", "org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations", - "org.springframework.orm.jpa.AbstractEntityManagerFactoryBean", - "javax.persistence.EntityManagerFactory" + "org.springframework.orm.jpa.AbstractEntityManagerFactoryBean" ); return Preconditions.check(Preconditions.or(