diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java index 77f41f55a0..711a12bce7 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java @@ -188,6 +188,9 @@ public class FlywayAutoConfiguration { map.from(properties.getPlaceholders()).to(configuration::placeholders); map.from(properties.getPlaceholderPrefix()).to(configuration::placeholderPrefix); map.from(properties.getPlaceholderSuffix()).to(configuration::placeholderSuffix); + // No method reference for compatibility with Flyway version < 8.0 + map.from(properties.getPlaceholderSeparator()) + .to((placeHolderSeparator) -> configuration.placeholderSeparator(placeHolderSeparator)); map.from(properties.isPlaceholderReplacement()).to(configuration::placeholderReplacement); map.from(properties.getSqlMigrationPrefix()).to(configuration::sqlMigrationPrefix); map.from(properties.getSqlMigrationSuffixes()).as(StringUtils::toStringArray) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java index 075b21fbb8..9829b53042 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java @@ -146,6 +146,11 @@ public class FlywayProperties { */ private String placeholderSuffix = "}"; + /** + * Separator of default placeholders. + */ + private String placeholderSeparator; + /** * Perform placeholder replacement in migration scripts. */ @@ -538,6 +543,14 @@ public class FlywayProperties { this.placeholderSuffix = placeholderSuffix; } + public String getPlaceholderSeparator() { + return this.placeholderSeparator; + } + + public void setPlaceholderSeparator(String placeholderSeparator) { + this.placeholderSeparator = placeholderSeparator; + } + public boolean isPlaceholderReplacement() { return this.placeholderReplacement; } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json index b76397c3e1..ad08d31ddc 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -923,6 +923,10 @@ "name": "spring.flyway.lock-retry-count", "defaultValue": 50 }, + { + "name": "spring.flyway.placeholder-separator", + "defaultValue": ":" + }, { "name": "spring.flyway.script-placeholder-prefix", "defaultValue": "FP__" diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/neo4j/Neo4jAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/neo4j/Neo4jAutoConfigurationTests.java index 3c892cc488..6903ff4ca1 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/neo4j/Neo4jAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/neo4j/Neo4jAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -292,7 +292,7 @@ class Neo4jAutoConfigurationTests { Config.TrustStrategy trustStrategy = mapDriverConfig(properties).trustStrategy(); assertThat(trustStrategy.strategy()) .isEqualTo(Config.TrustStrategy.Strategy.TRUST_CUSTOM_CA_SIGNED_CERTIFICATES); - assertThat(trustStrategy.certFile()).isEqualTo(certFile); + assertThat(trustStrategy.certFiles()).containsOnly(certFile); } @Test diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 819475aa5b..1510ed7c7f 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -62,7 +62,7 @@ bom { ] } } - library("Awaitility", "4.1.1") { + library("Awaitility", "4.2.0") { group("org.awaitility") { modules = [ "awaitility", @@ -97,7 +97,7 @@ bom { ] } } - library("Cassandra Driver", "4.13.0") { + library("Cassandra Driver", "4.14.0") { group("com.datastax.oss") { imports = [ "java-driver-bom" @@ -153,7 +153,7 @@ bom { ] } } - library("Couchbase Client", "3.2.5") { + library("Couchbase Client", "3.2.6") { group("com.couchbase.client") { modules = [ "java-client" @@ -184,14 +184,14 @@ bom { ] } } - library("Dropwizard Metrics", "4.2.8") { + library("Dropwizard Metrics", "4.2.9") { group("io.dropwizard.metrics") { imports = [ "metrics-bom" ] } } - library("Elasticsearch", "7.17.0") { + library("Elasticsearch", "7.17.1") { group("org.elasticsearch") { modules = [ "elasticsearch" @@ -229,7 +229,7 @@ bom { ] } } - library("Flyway", "8.5.1") { + library("Flyway", "8.5.4") { group("org.flywaydb") { modules = [ "flyway-core", @@ -314,7 +314,7 @@ bom { ] } } - library("Hazelcast", "5.1") { + library("Hazelcast", "5.1.1") { group("com.hazelcast") { modules = [ "hazelcast", @@ -330,7 +330,7 @@ bom { ] } } - library("Hibernate", "5.6.5.Final") { + library("Hibernate", "5.6.7.Final") { group("org.hibernate") { modules = [ "hibernate-c3p0", @@ -372,7 +372,7 @@ bom { ] } } - library("HtmlUnit", "2.58.0") { + library("HtmlUnit", "2.59.0") { group("net.sourceforge.htmlunit") { modules = [ "htmlunit" { @@ -438,7 +438,7 @@ bom { ] } } - library("Jackson Bom", "2.13.1") { + library("Jackson Bom", "2.13.2") { group("com.fasterxml.jackson") { imports = [ "jackson-bom" @@ -784,7 +784,7 @@ bom { ] } } - library("Liquibase", "4.8.0") { + library("Liquibase", "4.9.0") { group("org.liquibase") { modules = [ "liquibase-cdi", @@ -795,14 +795,14 @@ bom { ] } } - library("Log4j2", "2.17.1") { + library("Log4j2", "2.17.2") { group("org.apache.logging.log4j") { imports = [ "log4j-bom" ] } } - library("Logback", "1.2.10") { + library("Logback", "1.2.11") { group("ch.qos.logback") { modules = [ "logback-access", @@ -846,14 +846,14 @@ bom { ] } } - library("Maven Compiler Plugin", "3.10.0") { + library("Maven Compiler Plugin", "3.10.1") { group("org.apache.maven.plugins") { plugins = [ "maven-compiler-plugin" ] } } - library("Maven Dependency Plugin", "3.2.0") { + library("Maven Dependency Plugin", "3.3.0") { group("org.apache.maven.plugins") { plugins = [ "maven-dependency-plugin" @@ -970,7 +970,7 @@ bom { ] } } - library("Mockito", "4.3.1") { + library("Mockito", "4.4.0") { group("org.mockito") { modules = [ "mockito-core", @@ -1013,14 +1013,14 @@ bom { ] } } - library("Neo4j Java Driver", "4.4.3") { + library("Neo4j Java Driver", "4.4.5") { group("org.neo4j.driver") { modules = [ "neo4j-java-driver" ] } } - library("Netty", "4.1.74.Final") { + library("Netty", "4.1.75.Final") { group("io.netty") { imports = [ "netty-bom" @@ -1081,7 +1081,7 @@ bom { ] } } - library("R2DBC Bom", "Borca-RELEASE") { + library("R2DBC Bom", "Borca-SR1") { group("io.r2dbc") { imports = [ "r2dbc-bom" @@ -1095,7 +1095,7 @@ bom { ] } } - library("Rabbit Stream Client", "0.4.0") { + library("Rabbit Stream Client", "0.5.0") { group("com.rabbitmq") { modules = [ "stream-client" @@ -1226,14 +1226,14 @@ bom { ] } } - library("Selenium HtmlUnit", "3.58.0") { + library("Selenium HtmlUnit", "3.59.0") { group("org.seleniumhq.selenium") { modules = [ "htmlunit-driver" ] } } - library("SendGrid", "4.8.3") { + library("SendGrid", "4.9.0") { group("com.sendgrid") { modules = [ "sendgrid-java" @@ -1373,7 +1373,7 @@ bom { ] } } - library("Spring Retry", "1.3.1") { + library("Spring Retry", "1.3.2") { group("org.springframework.retry") { modules = [ "spring-retry" @@ -1472,7 +1472,7 @@ bom { ] } } - library("UnboundID LDAPSDK", "6.0.3") { + library("UnboundID LDAPSDK", "6.0.4") { group("com.unboundid") { modules = [ "unboundid-ldapsdk" @@ -1488,7 +1488,7 @@ bom { ] } } - library("Versions Maven Plugin", "2.9.0") { + library("Versions Maven Plugin", "2.10.0") { group("org.codehaus.mojo") { plugins = [ "versions-maven-plugin"