mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-03 07:49:03 +00:00
Refine 'Introduce a shared abstraction for database initialization'
Use test fixtures to keep getSettings() package-private See gh-46213
This commit is contained in:
+1
-2
@@ -62,9 +62,8 @@ public abstract class AbstractScriptDatabaseInitializer implements ResourceLoade
|
||||
/**
|
||||
* Return the {@link DatabaseInitializationSettings} being used by the initializer.
|
||||
* @return the settings being used
|
||||
* @since 4.0.0
|
||||
*/
|
||||
protected DatabaseInitializationSettings getSettings() {
|
||||
DatabaseInitializationSettings getSettings() {
|
||||
return this.settings;
|
||||
}
|
||||
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright 2012-present 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.sql.init;
|
||||
|
||||
/**
|
||||
* Helper to get the settings used by the {@link AbstractScriptDatabaseInitializer}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public final class ScriptDatabaseInitializerSettings {
|
||||
|
||||
private ScriptDatabaseInitializerSettings() {
|
||||
}
|
||||
|
||||
public static DatabaseInitializationSettings get(AbstractScriptDatabaseInitializer initializer) {
|
||||
return initializer.getSettings();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user