2270: Adding postgresql

This commit is contained in:
Dario Ghunney Ware 2024-12-04 14:14:28 +00:00
parent 574c474804
commit f0c7b6f597
4 changed files with 30 additions and 1 deletions

View File

@ -300,7 +300,7 @@ dependencies {
implementation 'com.unboundid.product.scim2:scim2-sdk-client:2.3.5' implementation 'com.unboundid.product.scim2:scim2-sdk-client:2.3.5'
// Don't upgrade h2database // Don't upgrade h2database
runtimeOnly "com.h2database:h2:2.3.232" runtimeOnly "org.postgresql:postgresql:42.7.4"
constraints { constraints {
implementation "org.opensaml:opensaml-core:$openSamlVersion" implementation "org.opensaml:opensaml-core:$openSamlVersion"
implementation "org.opensaml:opensaml-saml-api:$openSamlVersion" implementation "org.opensaml:opensaml-saml-api:$openSamlVersion"

View File

@ -110,6 +110,7 @@ public class DatabaseBackupHelper implements DatabaseBackupInterface {
return executeDatabaseScript(Paths.get(backupList.get(0).getFilePath())); return executeDatabaseScript(Paths.get(backupList.get(0).getFilePath()));
} }
// fixMe: Needs to check the type of DB before executing script
@Override @Override
public void exportDatabase() throws IOException { public void exportDatabase() throws IOException {
// Check if the backup directory exists, and create it if it does not // Check if the backup directory exists, and create it if it does not

View File

@ -6,6 +6,7 @@ import java.net.HttpURLConnection;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.net.URL; import java.net.URL;
import java.sql.Driver;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
@ -247,6 +248,28 @@ public class ApplicationProperties {
private String tessdataDir; private String tessdataDir;
private Boolean enableAlphaFunctionality; private Boolean enableAlphaFunctionality;
private String enableAnalytics; private String enableAnalytics;
private Datasource datasource;
}
@Data
public static class Datasource {
private String url;
private Driver driver;
private String username;
private String password;
}
public enum Driver {
H2("h2"),
POSTGRESQL("postgresql"),
ORACLE("oracle"),
MY_SQL("mysql");
private final String driverName;
Driver(String driverName) {
this.driverName = driverName;
}
} }
@Data @Data

View File

@ -85,6 +85,11 @@ system:
customHTMLFiles: false # enable to have files placed in /customFiles/templates override the existing template HTML files customHTMLFiles: false # enable to have files placed in /customFiles/templates override the existing template HTML files
tessdataDir: /usr/share/tessdata # path to the directory containing the Tessdata files. This setting is relevant for Windows systems. For Windows users, this path should be adjusted to point to the appropriate directory where the Tessdata files are stored. tessdataDir: /usr/share/tessdata # path to the directory containing the Tessdata files. This setting is relevant for Windows systems. For Windows users, this path should be adjusted to point to the appropriate directory where the Tessdata files are stored.
enableAnalytics: undefined # set to 'true' to enable analytics, set to 'false' to disable analytics; for enterprise users, this is set to true enableAnalytics: undefined # set to 'true' to enable analytics, set to 'false' to disable analytics; for enterprise users, this is set to true
datasource:
url: jdbc:postgresql://localhost:5432/stirling-pdf-DB
driver: postgresql
username: postgres
password:
ui: ui:
appName: '' # application's visible name appName: '' # application's visible name