Start building against Spring Framework 5.2.9 snapshots
See gh-23182
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
@@ -385,7 +386,7 @@ public class FlywayAutoConfiguration {
|
||||
|
||||
private DatabaseDriver getDatabaseDriver() {
|
||||
try {
|
||||
String url = JdbcUtils.extractDatabaseMetaData(this.dataSource, "getURL");
|
||||
String url = JdbcUtils.extractDatabaseMetaData(this.dataSource, DatabaseMetaData::getURL);
|
||||
return DatabaseDriver.fromJdbcUrl(url);
|
||||
}
|
||||
catch (MetaDataAccessException ex) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 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.
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.boot.autoconfigure.jooq;
|
||||
|
||||
import java.sql.DatabaseMetaData;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
@@ -49,7 +51,7 @@ final class SqlDialectLookup {
|
||||
return SQLDialect.DEFAULT;
|
||||
}
|
||||
try {
|
||||
String url = JdbcUtils.extractDatabaseMetaData(dataSource, "getURL");
|
||||
String url = JdbcUtils.extractDatabaseMetaData(dataSource, DatabaseMetaData::getURL);
|
||||
SQLDialect sqlDialect = JDBCUtils.dialect(url);
|
||||
if (sqlDialect != null) {
|
||||
return sqlDialect;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 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.
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.boot.autoconfigure.orm.jpa;
|
||||
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
@@ -70,7 +71,7 @@ final class DatabaseLookup {
|
||||
return Database.DEFAULT;
|
||||
}
|
||||
try {
|
||||
String url = JdbcUtils.extractDatabaseMetaData(dataSource, "getURL");
|
||||
String url = JdbcUtils.extractDatabaseMetaData(dataSource, DatabaseMetaData::getURL);
|
||||
DatabaseDriver driver = DatabaseDriver.fromJdbcUrl(url);
|
||||
Database database = LOOKUP.get(driver);
|
||||
if (database != null) {
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
<spring-batch.version>4.2.4.RELEASE</spring-batch.version>
|
||||
<spring-cloud-connectors.version>2.0.7.RELEASE</spring-cloud-connectors.version>
|
||||
<spring-data-releasetrain.version>Moore-SR9</spring-data-releasetrain.version>
|
||||
<spring-framework.version>5.2.8.RELEASE</spring-framework.version>
|
||||
<spring-framework.version>5.2.9.BUILD-SNAPSHOT</spring-framework.version>
|
||||
<spring-hateoas.version>1.0.5.RELEASE</spring-hateoas.version>
|
||||
<spring-integration.version>5.2.8.RELEASE</spring-integration.version>
|
||||
<spring-kafka.version>2.3.10.RELEASE</spring-kafka.version>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 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.
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.boot.jdbc;
|
||||
|
||||
import java.sql.DatabaseMetaData;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -87,7 +89,7 @@ public abstract class AbstractDataSourceInitializer {
|
||||
protected String getDatabaseName() {
|
||||
try {
|
||||
String productName = JdbcUtils.commonDatabaseName(
|
||||
JdbcUtils.extractDatabaseMetaData(this.dataSource, "getDatabaseProductName").toString());
|
||||
JdbcUtils.extractDatabaseMetaData(this.dataSource, DatabaseMetaData::getDatabaseProductName));
|
||||
DatabaseDriver databaseDriver = DatabaseDriver.fromProductName(productName);
|
||||
if (databaseDriver == DatabaseDriver.UNKNOWN) {
|
||||
throw new IllegalStateException("Unable to detect database type");
|
||||
|
||||
Reference in New Issue
Block a user