Skip to content

Commit 32c1dd4

Browse files
committed
Revert "Merge pull request #19926 from xak2000"
Closes gh-19926
1 parent 41b0544 commit 32c1dd4

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/liquibase/LiquibaseEndpointTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2019 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.
@@ -104,10 +104,10 @@ public void whenMultipleLiquibaseBeansArePresentChangeSetsAreCorrectlyReportedFo
104104
.liquibaseBeans().getContexts().get(context.getId()).getLiquibaseBeans();
105105
assertThat(liquibaseBeans.get("liquibase").getChangeSets()).hasSize(1);
106106
assertThat(liquibaseBeans.get("liquibase").getChangeSets().get(0).getChangeLog())
107-
.isEqualTo("classpath:db/changelog/db.changelog-master.yaml");
107+
.isEqualTo("classpath:/db/changelog/db.changelog-master.yaml");
108108
assertThat(liquibaseBeans.get("liquibaseBackup").getChangeSets()).hasSize(1);
109109
assertThat(liquibaseBeans.get("liquibaseBackup").getChangeSets().get(0).getChangeLog())
110-
.isEqualTo("classpath:db/changelog/db.changelog-master-backup.yaml");
110+
.isEqualTo("classpath:/db/changelog/db.changelog-master-backup.yaml");
111111
});
112112
}
113113

@@ -157,7 +157,7 @@ private DataSource createEmbeddedDatabase() {
157157

158158
private SpringLiquibase createSpringLiquibase(String changeLog, DataSource dataSource) {
159159
SpringLiquibase liquibase = new SpringLiquibase();
160-
liquibase.setChangeLog("classpath:db/changelog/" + changeLog);
160+
liquibase.setChangeLog("classpath:/db/changelog/" + changeLog);
161161
liquibase.setShouldRun(true);
162162
liquibase.setDataSource(dataSource);
163163
return liquibase;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2019 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.
@@ -36,7 +36,7 @@ public class LiquibaseProperties {
3636
/**
3737
* Change log configuration path.
3838
*/
39-
private String changeLog = "classpath:db/changelog/db.changelog-master.yaml";
39+
private String changeLog = "classpath:/db/changelog/db.changelog-master.yaml";
4040

4141
/**
4242
* Comma-separated list of runtime contexts to use.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@
964964
"name": "liquibase.change-log",
965965
"type": "java.lang.String",
966966
"description": "Change log configuration path.",
967-
"defaultValue": "classpath:db/changelog/db.changelog-master.yaml",
967+
"defaultValue": "classpath:/db/changelog/db.changelog-master.yaml",
968968
"deprecation": {
969969
"replacement": "spring.liquibase.change-log",
970970
"level": "error"

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfigurationTests.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2019 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.
@@ -92,7 +92,7 @@ public void noDataSource() {
9292
public void defaultSpringLiquibase() {
9393
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
9494
.run(assertLiquibase((liquibase) -> {
95-
assertThat(liquibase.getChangeLog()).isEqualTo("classpath:db/changelog/db.changelog-master.yaml");
95+
assertThat(liquibase.getChangeLog()).isEqualTo("classpath:/db/changelog/db.changelog-master.yaml");
9696
assertThat(liquibase.getContexts()).isNull();
9797
assertThat(liquibase.getDefaultSchema()).isNull();
9898
assertThat(liquibase.isDropFirst()).isFalse();
@@ -102,26 +102,26 @@ public void defaultSpringLiquibase() {
102102
@Test
103103
public void changelogXml() {
104104
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
105-
.withPropertyValues("spring.liquibase.change-log:classpath:db/changelog/db.changelog-override.xml")
105+
.withPropertyValues("spring.liquibase.change-log:classpath:/db/changelog/db.changelog-override.xml")
106106
.run(assertLiquibase((liquibase) -> assertThat(liquibase.getChangeLog())
107-
.isEqualTo("classpath:db/changelog/db.changelog-override.xml")));
107+
.isEqualTo("classpath:/db/changelog/db.changelog-override.xml")));
108108
}
109109

110110
@Test
111111
public void changelogJson() {
112112
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
113-
.withPropertyValues("spring.liquibase.change-log:classpath:db/changelog/db.changelog-override.json")
113+
.withPropertyValues("spring.liquibase.change-log:classpath:/db/changelog/db.changelog-override.json")
114114
.run(assertLiquibase((liquibase) -> assertThat(liquibase.getChangeLog())
115-
.isEqualTo("classpath:db/changelog/db.changelog-override.json")));
115+
.isEqualTo("classpath:/db/changelog/db.changelog-override.json")));
116116
}
117117

118118
@Test
119119
public void changelogSql() {
120120
Assume.javaEight();
121121
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
122-
.withPropertyValues("spring.liquibase.change-log:classpath:db/changelog/db.changelog-override.sql")
122+
.withPropertyValues("spring.liquibase.change-log:classpath:/db/changelog/db.changelog-override.sql")
123123
.run(assertLiquibase((liquibase) -> assertThat(liquibase.getChangeLog())
124-
.isEqualTo("classpath:db/changelog/db.changelog-override.sql")));
124+
.isEqualTo("classpath:/db/changelog/db.changelog-override.sql")));
125125
}
126126

127127
@Test
@@ -354,7 +354,7 @@ static class LiquibaseUserConfiguration {
354354
@Bean
355355
SpringLiquibase springLiquibase(DataSource dataSource) {
356356
SpringLiquibase liquibase = new SpringLiquibase();
357-
liquibase.setChangeLog("classpath:db/changelog/db.changelog-master.yaml");
357+
liquibase.setChangeLog("classpath:/db/changelog/db.changelog-master.yaml");
358358
liquibase.setShouldRun(true);
359359
liquibase.setDataSource(dataSource);
360360
return liquibase;

spring-boot-samples/spring-boot-sample-liquibase/src/test/java/sample/liquibase/SampleLiquibaseApplicationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2019 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.
@@ -61,9 +61,9 @@ public void testDefaultSettings() throws Exception {
6161
assertThat(output).contains("Successfully acquired change log lock")
6262
.contains("Creating database history " + "table with name: PUBLIC.DATABASECHANGELOG")
6363
.contains("Table person created")
64-
.contains("ChangeSet classpath:db/" + "changelog/db.changelog-master.yaml::1::"
64+
.contains("ChangeSet classpath:/db/" + "changelog/db.changelog-master.yaml::1::"
6565
+ "marceloverdijk ran successfully")
66-
.contains("New row inserted into person").contains("ChangeSet classpath:db/changelog/"
66+
.contains("New row inserted into person").contains("ChangeSet classpath:/db/changelog/"
6767
+ "db.changelog-master.yaml::2::" + "marceloverdijk ran successfully")
6868
.contains("Successfully released change log lock");
6969
}

0 commit comments

Comments
 (0)