Shared static instance of DefaultDataBufferFactory
This commit is contained in:
@@ -74,7 +74,7 @@ public class ResourceDatabasePopulator implements DatabasePopulator {
|
||||
|
||||
private boolean ignoreFailedDrops = false;
|
||||
|
||||
private DataBufferFactory dataBufferFactory = new DefaultDataBufferFactory();
|
||||
private DataBufferFactory dataBufferFactory = DefaultDataBufferFactory.sharedInstance;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -512,8 +512,9 @@ public abstract class ScriptUtils {
|
||||
* @see org.springframework.r2dbc.connection.ConnectionFactoryUtils#releaseConnection
|
||||
*/
|
||||
public static Mono<Void> executeSqlScript(Connection connection, EncodedResource resource) throws ScriptException {
|
||||
return executeSqlScript(connection, resource, new DefaultDataBufferFactory(), false, false, DEFAULT_COMMENT_PREFIX,
|
||||
DEFAULT_STATEMENT_SEPARATOR, DEFAULT_BLOCK_COMMENT_START_DELIMITER, DEFAULT_BLOCK_COMMENT_END_DELIMITER);
|
||||
return executeSqlScript(connection, resource, DefaultDataBufferFactory.sharedInstance, false, false,
|
||||
DEFAULT_COMMENT_PREFIX, DEFAULT_STATEMENT_SEPARATOR, DEFAULT_BLOCK_COMMENT_START_DELIMITER,
|
||||
DEFAULT_BLOCK_COMMENT_END_DELIMITER);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user