Skip to content

Commit ea244aa

Browse files
committed
Merge branch '2.1.x'
Closes gh-17769
2 parents f021c22 + faaada1 commit ea244aa

File tree

3 files changed

+11
-26
lines changed

3 files changed

+11
-26
lines changed

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import java.util.function.Supplier;
2020

21-
import javax.annotation.PostConstruct;
2221
import javax.persistence.EntityManagerFactory;
2322
import javax.sql.DataSource;
2423

@@ -46,13 +45,11 @@
4645
import org.springframework.context.annotation.Conditional;
4746
import org.springframework.context.annotation.Configuration;
4847
import org.springframework.context.annotation.Import;
49-
import org.springframework.core.io.Resource;
5048
import org.springframework.core.io.ResourceLoader;
5149
import org.springframework.jdbc.core.JdbcOperations;
5250
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
5351
import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean;
5452
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
55-
import org.springframework.util.Assert;
5653

5754
/**
5855
* {@link EnableAutoConfiguration Auto-configuration} for Liquibase.
@@ -95,15 +92,6 @@ public LiquibaseConfiguration(LiquibaseProperties properties, ResourceLoader res
9592
this.resourceLoader = resourceLoader;
9693
}
9794

98-
@PostConstruct
99-
public void checkChangelogExists() {
100-
if (this.properties.isCheckChangeLogLocation()) {
101-
Resource resource = this.resourceLoader.getResource(this.properties.getChangeLog());
102-
Assert.state(resource.exists(), () -> "Cannot find changelog location: " + resource
103-
+ " (please add changelog or check your Liquibase configuration)");
104-
}
105-
}
106-
10795
@Bean
10896
public SpringLiquibase liquibase(DataSourceProperties dataSourceProperties,
10997
ObjectProvider<DataSource> dataSource,

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ public class LiquibaseProperties {
3838
*/
3939
private String changeLog = "classpath:/db/changelog/db.changelog-master.yaml";
4040

41-
/**
42-
* Whether to check that the change log location exists.
43-
*/
44-
private boolean checkChangeLogLocation = true;
45-
4641
/**
4742
* Comma-separated list of runtime contexts to use.
4843
*/
@@ -128,14 +123,6 @@ public void setChangeLog(String changeLog) {
128123
this.changeLog = changeLog;
129124
}
130125

131-
public boolean isCheckChangeLogLocation() {
132-
return this.checkChangeLogLocation;
133-
}
134-
135-
public void setCheckChangeLogLocation(boolean checkChangeLogLocation) {
136-
this.checkChangeLogLocation = checkChangeLogLocation;
137-
}
138-
139126
public String getContexts() {
140127
return this.contexts;
141128
}

spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@
10541054
"description": "Check the change log location exists.",
10551055
"defaultValue": true,
10561056
"deprecation": {
1057-
"replacement": "spring.liquibase.check-change-log-location",
1057+
"reason": "Liquibase has it's own check that checks if the change log location exists making this property redundant.",
10581058
"level": "error"
10591059
}
10601060
},
@@ -1963,6 +1963,16 @@
19631963
"level": "error"
19641964
}
19651965
},
1966+
{
1967+
"name": "spring.liquibase.check-change-log-location",
1968+
"type": "java.lang.Boolean",
1969+
"description": "Check the change log location exists.",
1970+
"defaultValue": true,
1971+
"deprecation": {
1972+
"reason": "Liquibase has it's own check that checks if the change log location exists making this property redundant.",
1973+
"level": "error"
1974+
}
1975+
},
19661976
{
19671977
"name": "spring.messages.cache-seconds",
19681978
"type": "java.lang.Integer",

0 commit comments

Comments
 (0)