mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-12 17:52:13 +02:00
Update DatabaseService.java
This commit is contained in:
parent
7fae826f9c
commit
33efd5ed8e
@ -248,22 +248,23 @@ public class DatabaseService implements DatabaseInterface {
|
|||||||
|| datasource.getCustomDatabaseUrl().contains("H2");
|
|| datasource.getCustomDatabaseUrl().contains("H2");
|
||||||
boolean isCustomDatabase = datasource.isEnableCustomDatabase();
|
boolean isCustomDatabase = datasource.isEnableCustomDatabase();
|
||||||
|
|
||||||
if (isTypeH2 && !isDBUrlH2 && isCustomDatabase) {
|
if (isCustomDatabase) {
|
||||||
log.warn(
|
if (isTypeH2 && !isDBUrlH2) {
|
||||||
"Datasource type is H2, but the URL does not contain 'h2'. "
|
log.warn(
|
||||||
+ "Please check your configuration.");
|
"Datasource type is H2, but the URL does not contain 'h2'. "
|
||||||
throw new IllegalStateException(
|
+ "Please check your configuration.");
|
||||||
"Datasource type is H2, but the URL does not contain 'h2'. Please check your"
|
throw new IllegalStateException(
|
||||||
+ " configuration.");
|
"Datasource type is H2, but the URL does not contain 'h2'. Please check"
|
||||||
} else if (!isTypeH2 && isDBUrlH2 && isCustomDatabase) {
|
+ " your configuration.");
|
||||||
log.warn(
|
} else if (!isTypeH2 && isDBUrlH2) {
|
||||||
"Datasource URL contains 'h2', but the type is not H2. "
|
log.warn(
|
||||||
+ "Please check your configuration.");
|
"Datasource URL contains 'h2', but the type is not H2. "
|
||||||
throw new IllegalStateException(
|
+ "Please check your configuration.");
|
||||||
"Datasource URL contains 'h2', but the type is not H2. Please check your"
|
throw new IllegalStateException(
|
||||||
+ " configuration.");
|
"Datasource URL contains 'h2', but the type is not H2. Please check your"
|
||||||
|
+ " configuration.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isH2 = isTypeH2 && isDBUrlH2;
|
boolean isH2 = isTypeH2 && isDBUrlH2;
|
||||||
|
|
||||||
return !isCustomDatabase || isH2;
|
return !isCustomDatabase || isH2;
|
||||||
|
Loading…
Reference in New Issue
Block a user