|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012-2020 the original author or authors.
|
|
|
|
|
* Copyright 2012-2021 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.
|
|
|
|
@ -53,14 +53,15 @@ public class DataSourceProperties implements BeanClassLoaderAware, InitializingB
|
|
|
|
|
private ClassLoader classLoader;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Name of the datasource. Default to "testdb" when using an embedded database.
|
|
|
|
|
* Whether to generate a random datasource name.
|
|
|
|
|
*/
|
|
|
|
|
private String name;
|
|
|
|
|
private boolean generateUniqueName = true;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Whether to generate a random datasource name.
|
|
|
|
|
* Datasource name to use if "generate-unique-name" is false. Defaults to "testdb"
|
|
|
|
|
* when using an embedded database, otherwise null.
|
|
|
|
|
*/
|
|
|
|
|
private boolean generateUniqueName = true;
|
|
|
|
|
private String name;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Fully qualified name of the connection pool implementation to use. By default, it
|
|
|
|
@ -177,14 +178,6 @@ public class DataSourceProperties implements BeanClassLoaderAware, InitializingB
|
|
|
|
|
.url(determineUrl()).username(determineUsername()).password(determinePassword());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
|
return this.name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setName(String name) {
|
|
|
|
|
this.name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean isGenerateUniqueName() {
|
|
|
|
|
return this.generateUniqueName;
|
|
|
|
|
}
|
|
|
|
@ -193,6 +186,14 @@ public class DataSourceProperties implements BeanClassLoaderAware, InitializingB
|
|
|
|
|
this.generateUniqueName = generateUniqueName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
|
return this.name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setName(String name) {
|
|
|
|
|
this.name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Class<? extends DataSource> getType() {
|
|
|
|
|
return this.type;
|
|
|
|
|
}
|
|
|
|
|