Skip to content

Commit 2ede9e6

Browse files
committed
Merge branch '2.1.x' into 2.2.x
Closes gh-20117
2 parents 06c85e9 + 32c1dd4 commit 2ede9e6

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 @@ void whenMultipleLiquibaseBeansArePresentChangeSetsAreCorrectlyReportedForEachBe
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
@@ -1043,7 +1043,7 @@
10431043
"name": "liquibase.change-log",
10441044
"type": "java.lang.String",
10451045
"description": "Change log configuration path.",
1046-
"defaultValue": "classpath:db/changelog/db.changelog-master.yaml",
1046+
"defaultValue": "classpath:/db/changelog/db.changelog-master.yaml",
10471047
"deprecation": {
10481048
"replacement": "spring.liquibase.change-log",
10491049
"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.
@@ -102,7 +102,7 @@ void createsDataSourceWithNoDataSourceBeanAndLiquibaseUrl() {
102102
void defaultSpringLiquibase() {
103103
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
104104
.run(assertLiquibase((liquibase) -> {
105-
assertThat(liquibase.getChangeLog()).isEqualTo("classpath:db/changelog/db.changelog-master.yaml");
105+
assertThat(liquibase.getChangeLog()).isEqualTo("classpath:/db/changelog/db.changelog-master.yaml");
106106
assertThat(liquibase.getContexts()).isNull();
107107
assertThat(liquibase.getDefaultSchema()).isNull();
108108
assertThat(liquibase.isDropFirst()).isFalse();
@@ -112,26 +112,26 @@ void defaultSpringLiquibase() {
112112
@Test
113113
void changelogXml() {
114114
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
115-
.withPropertyValues("spring.liquibase.change-log:classpath:db/changelog/db.changelog-override.xml")
115+
.withPropertyValues("spring.liquibase.change-log:classpath:/db/changelog/db.changelog-override.xml")
116116
.run(assertLiquibase((liquibase) -> assertThat(liquibase.getChangeLog())
117-
.isEqualTo("classpath:db/changelog/db.changelog-override.xml")));
117+
.isEqualTo("classpath:/db/changelog/db.changelog-override.xml")));
118118
}
119119

120120
@Test
121121
void changelogJson() {
122122
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
123-
.withPropertyValues("spring.liquibase.change-log:classpath:db/changelog/db.changelog-override.json")
123+
.withPropertyValues("spring.liquibase.change-log:classpath:/db/changelog/db.changelog-override.json")
124124
.run(assertLiquibase((liquibase) -> assertThat(liquibase.getChangeLog())
125-
.isEqualTo("classpath:db/changelog/db.changelog-override.json")));
125+
.isEqualTo("classpath:/db/changelog/db.changelog-override.json")));
126126
}
127127

128128
@Test
129129
@EnabledOnJre(JRE.JAVA_8)
130130
void changelogSql() {
131131
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
132-
.withPropertyValues("spring.liquibase.change-log:classpath:db/changelog/db.changelog-override.sql")
132+
.withPropertyValues("spring.liquibase.change-log:classpath:/db/changelog/db.changelog-override.sql")
133133
.run(assertLiquibase((liquibase) -> assertThat(liquibase.getChangeLog())
134-
.isEqualTo("classpath:db/changelog/db.changelog-override.sql")));
134+
.isEqualTo("classpath:/db/changelog/db.changelog-override.sql")));
135135
}
136136

137137
@Test
@@ -374,7 +374,7 @@ static class LiquibaseUserConfiguration {
374374
@Bean
375375
SpringLiquibase springLiquibase(DataSource dataSource) {
376376
SpringLiquibase liquibase = new SpringLiquibase();
377-
liquibase.setChangeLog("classpath:db/changelog/db.changelog-master.yaml");
377+
liquibase.setChangeLog("classpath:/db/changelog/db.changelog-master.yaml");
378378
liquibase.setShouldRun(true);
379379
liquibase.setDataSource(dataSource);
380380
return liquibase;

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-liquibase/src/test/java/smoketest/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.
@@ -59,10 +59,10 @@ void testDefaultSettings(CapturedOutput output) throws Exception {
5959
assertThat(output).contains("Successfully acquired change log lock")
6060
.contains("Creating database history table with name: PUBLIC.DATABASECHANGELOG")
6161
.contains("Table person created")
62-
.contains("ChangeSet classpath:db/changelog/db.changelog-master.yaml::1::"
62+
.contains("ChangeSet classpath:/db/changelog/db.changelog-master.yaml::1::"
6363
+ "marceloverdijk ran successfully")
6464
.contains("New row inserted into person")
65-
.contains("ChangeSet classpath:db/changelog/"
65+
.contains("ChangeSet classpath:/db/changelog/"
6666
+ "db.changelog-master.yaml::2::marceloverdijk ran successfully")
6767
.contains("Successfully released change log lock");
6868
}

0 commit comments

Comments
 (0)