-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2270: External DB Support #2457
base: main
Are you sure you want to change the base?
Conversation
logger.info("Navigate to {}", url); | ||
} | ||
|
||
private static String[] getActiveProfile(String[] args) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sets the active profile(s). Will be set to default
if nothing is selected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class sets the DB configuration. All other classes will use this to connect to the DB
private Datasource datasource; | ||
} | ||
|
||
@Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New Datasource
class. Will pick up configuration from the settings.yml
private String password; | ||
} | ||
|
||
public enum Driver { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New Driver
class
@@ -85,6 +86,11 @@ system: | |||
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. | |||
enableAnalytics: undefined # set to 'true' to enable analytics, set to 'false' to disable analytics; for enterprise users, this is set to true | |||
datasource: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configure the DB connection here
@@ -41,19 +39,21 @@ spring.mvc.async.request-timeout=${SYSTEM_CONNECTIONTIMEOUTMILLISECONDS:1200000} | |||
#spring.thymeleaf.prefix=file:/customFiles/templates/,classpath:/templates/ | |||
#spring.thymeleaf.cache=false | |||
|
|||
spring.datasource.url=jdbc:h2:file:./configs/stirling-pdf-DB-2.3.232;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should support and still default to using a DB file for ease of adoption and use of users,
We should still allow H2 file connection and ensure this is the default type
But still offer it to users for postgres etc
@@ -85,6 +86,11 @@ system: | |||
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. | |||
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://db:5432/stirling_pdf | |||
driver: postgresql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add comment stating the other driver types, example URLs etc
private String url; | ||
private Driver driver; | ||
private String username; | ||
private String password; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
password needs @ToString.Exclude to avoid logging
🚀 Translation Verification Summary🔄 Reference Branch:
|
d0e3ae9
to
46da009
Compare
46da009
to
3584156
Compare
7dad36c
to
2ec6c98
Compare
Description
Please provide a summary of the changes, including relevant motivation and context.
Closes #(issue_number)
Checklist