|
|
|
@ -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.
|
|
|
|
@ -20,6 +20,7 @@ import java.util.List;
|
|
|
|
|
|
|
|
|
|
import javax.sql.DataSource;
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.jdbc.DatabaseDriver;
|
|
|
|
|
import org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer;
|
|
|
|
|
import org.springframework.boot.jdbc.init.PlatformPlaceholderDatabaseDriverResolver;
|
|
|
|
|
import org.springframework.boot.sql.init.DatabaseInitializationSettings;
|
|
|
|
@ -77,6 +78,7 @@ public class IntegrationDataSourceScriptDatabaseInitializer extends DataSourceSc
|
|
|
|
|
|
|
|
|
|
private static List<String> resolveSchemaLocations(DataSource dataSource, IntegrationProperties.Jdbc properties) {
|
|
|
|
|
PlatformPlaceholderDatabaseDriverResolver platformResolver = new PlatformPlaceholderDatabaseDriverResolver();
|
|
|
|
|
platformResolver = platformResolver.withDriverPlatform(DatabaseDriver.MARIADB, "mysql");
|
|
|
|
|
if (StringUtils.hasText(properties.getPlatform())) {
|
|
|
|
|
return platformResolver.resolveAll(properties.getPlatform(), properties.getSchema());
|
|
|
|
|
}
|
|
|
|
|