Skip to content

Commit bf88073

Browse files
committed
Tighten Liquibase auto-configuration to require Liquibase 3
Closes gh-11641
1 parent 023bc13 commit bf88073

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
2424
import javax.persistence.EntityManagerFactory;
2525
import javax.sql.DataSource;
2626

27+
import liquibase.change.DatabaseChange;
2728
import liquibase.exception.LiquibaseException;
2829
import liquibase.integration.spring.SpringLiquibase;
2930

@@ -60,7 +61,7 @@
6061
* @since 1.1.0
6162
*/
6263
@Configuration
63-
@ConditionalOnClass(SpringLiquibase.class)
64+
@ConditionalOnClass({ SpringLiquibase.class, DatabaseChange.class })
6465
@ConditionalOnBean(DataSource.class)
6566
@ConditionalOnProperty(prefix = "spring.liquibase", name = "enabled", matchIfMissing = true)
6667
@AutoConfigureAfter({ DataSourceAutoConfiguration.class,

0 commit comments

Comments
 (0)