Merge pull request #34729 from Ferioney

* pr/34729:
  Polish "Fix hint to include all Liquibase resources in default location"
  Fix hint to include all Liquibase resources in default location

Closes gh-34729
pull/35377/head
Stephane Nicoll 2 years ago
commit 164ab5186c

@ -175,7 +175,7 @@ public class LiquibaseAutoConfiguration {
@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
hints.resources().registerPattern("db/changelog/db.changelog-master.yaml");
hints.resources().registerPattern("db/changelog/*");
}
}

@ -423,8 +423,10 @@ class LiquibaseAutoConfigurationTests {
void shouldRegisterHints() {
RuntimeHints hints = new RuntimeHints();
new LiquibaseAutoConfigurationRuntimeHints().registerHints(hints, getClass().getClassLoader());
assertThat(RuntimeHintsPredicates.resource().forResource("db/changelog/")).accepts(hints);
assertThat(RuntimeHintsPredicates.resource().forResource("db/changelog/db.changelog-master.yaml"))
.accepts(hints);
assertThat(RuntimeHintsPredicates.resource().forResource("db/changelog/tables/init.sql")).accepts(hints);
}
private ContextConsumer<AssertableApplicationContext> assertLiquibase(Consumer<SpringLiquibase> consumer) {

Loading…
Cancel
Save