diff --git a/README.md b/README.md index ec7c0e1a..f623a294 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,6 @@ system: googlevisibility: false # 'true' to allow Google visibility, 'false' to disallow rootPath: / # Set the application's root URI (e.g. pdf-app for http://localhost/pdf-app) customstaticFilePath: '/customFiles/static/' # Directory path for custom static files - maxFileSize: 2000 # Set the maximum file size in MB ui: homeName: # Application's visible name diff --git a/src/main/java/stirling/software/SPDF/SPdfApplication.java b/src/main/java/stirling/software/SPDF/SPdfApplication.java index 4c3dcebb..c26999d0 100644 --- a/src/main/java/stirling/software/SPDF/SPdfApplication.java +++ b/src/main/java/stirling/software/SPDF/SPdfApplication.java @@ -51,7 +51,7 @@ public class SPdfApplication { SpringApplication app = new SpringApplication(SPdfApplication.class); app.addInitializers(new ConfigInitializer()); if (Files.exists(Paths.get("configs/settings.yml"))) { - app.setDefaultProperties(Collections.singletonMap("spring.config.location", "file:configs/settings.yml")); + app.setDefaultProperties(Collections.singletonMap("spring.config.additional-location", "file:configs/settings.yml")); } else { System.out.println("External configuration file 'configs/settings.yml' does not exist. Using default configuration and environment configuration instead."); } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index ebf97ec2..f5643af8 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,12 +1,5 @@ -spring.http.multipart.max-file-size=${MAX_FILE_SIZE:2000MB} -spring.http.multipart.max-request-size=${MAX_FILE_SIZE:2000MB} - multipart.enabled=true -multipart.max-file-size=${MAX_FILE_SIZE:2000MB} -multipart.max-request-size=${MAX_FILE_SIZE:2000MB} -spring.servlet.multipart.max-file-size=${MAX_FILE_SIZE:2000MB} -spring.servlet.multipart.max-request-size=${MAX_FILE_SIZE:2000MB} server.forward-headers-strategy=NATIVE @@ -20,6 +13,8 @@ server.error.include-message=always #logging.level.org.springframework=DEBUG #logging.level.org.springframework.security=DEBUG +spring.servlet.multipart.max-file-size=2000MB +spring.servlet.multipart.max-request-size=2000MB server.servlet.session.tracking-modes=cookie server.servlet.context-path=${SYSTEM_ROOTURIPATH:/} @@ -36,7 +31,6 @@ spring.resources.static-locations=file:customFiles/static/ #spring.thymeleaf.prefix=file:/customFiles/templates/,classpath:/templates/ #spring.thymeleaf.cache=false - spring.datasource.url=jdbc:h2:file:./configs/stirling-pdf-DB;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE spring.datasource.driver-class-name=org.h2.Driver spring.datasource.username=sa diff --git a/src/main/resources/settings.yml.template b/src/main/resources/settings.yml.template index 5d9d6118..cecad0dd 100644 --- a/src/main/resources/settings.yml.template +++ b/src/main/resources/settings.yml.template @@ -14,10 +14,7 @@ system: googlevisibility: false # 'true' to allow Google visibility, 'false' to disallow rootURIPath: / # Set the application's root URI (e.g. /pdf-app) customStaticFilePath: '/customFiles/static/' # Directory path for custom static files - maxFileSize: 2000 # Set the maximum file size in MB - connectionTimeoutMinutes: 5m - connectionTimeoutMilliSeconds: 300000 - + #ui: # appName: exampleAppName # Application's visible name # homeDescription: I am a description # Short description or tagline shown on homepage.