Merge branch '2.7.x' into 3.0.x

This commit is contained in:
Phillip Webb 2023-03-23 23:00:50 -07:00
commit b6777524f7
3 changed files with 13 additions and 7 deletions

View File

@ -203,7 +203,7 @@ public abstract class AbstractApplicationContextRunner<SELF extends AbstractAppl
/** /**
* Customize the {@link ClassLoader} that the {@link ApplicationContext} should use * Customize the {@link ClassLoader} that the {@link ApplicationContext} should use
* for resource loading and bean class loading. * for resource loading and bean class loading.
* @param classLoader the classloader to use (can be null to use the default) * @param classLoader the classloader to use (or {@code null} to use the default)
* @return a new instance with the updated class loader * @return a new instance with the updated class loader
* @see FilteredClassLoader * @see FilteredClassLoader
*/ */

View File

@ -106,7 +106,7 @@ public class SpringApplicationBuilder {
* Creates a new {@link SpringApplication} instance from the given sources using the * Creates a new {@link SpringApplication} instance from the given sources using the
* given {@link ResourceLoader}. Subclasses may override in order to provide a custom * given {@link ResourceLoader}. Subclasses may override in order to provide a custom
* subclass of {@link SpringApplication}. * subclass of {@link SpringApplication}.
* @param resourceLoader the resource loader (can be null) * @param resourceLoader the resource loader or {@code null}
* @param sources the sources * @param sources the sources
* @return the {@link SpringApplication} instance * @return the {@link SpringApplication} instance
* @since 2.6.0 * @since 2.6.0

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2022 the original author or authors. * Copyright 2012-2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -98,10 +98,12 @@ public enum DatabaseDriver {
* @since 2.1.0 * @since 2.1.0
*/ */
HANA("HDB", "com.sap.db.jdbc.Driver", "com.sap.db.jdbcext.XADataSourceSAP", "SELECT 1 FROM SYS.DUMMY") { HANA("HDB", "com.sap.db.jdbc.Driver", "com.sap.db.jdbcext.XADataSourceSAP", "SELECT 1 FROM SYS.DUMMY") {
@Override @Override
protected Collection<String> getUrlPrefixes() { protected Collection<String> getUrlPrefixes() {
return Collections.singleton("sap"); return Collections.singleton("sap");
} }
}, },
/** /**
@ -240,14 +242,18 @@ public enum DatabaseDriver {
return name().toLowerCase(Locale.ENGLISH); return name().toLowerCase(Locale.ENGLISH);
} }
protected boolean matchProductName(String productName) { /**
return this.productName != null && this.productName.equalsIgnoreCase(productName); * Return the url prefixes of this driver.
} * @return the url prefixes
*/
protected Collection<String> getUrlPrefixes() { protected Collection<String> getUrlPrefixes() {
return Collections.singleton(name().toLowerCase(Locale.ENGLISH)); return Collections.singleton(name().toLowerCase(Locale.ENGLISH));
} }
protected boolean matchProductName(String productName) {
return this.productName != null && this.productName.equalsIgnoreCase(productName);
}
/** /**
* Return the driver class name. * Return the driver class name.
* @return the class name or {@code null} * @return the class name or {@code null}