diff options
| author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2026-06-09 11:09:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-09 11:09:28 +0200 |
| commit | 475e1c0078f2026a2b395fef2ec85219013bde81 (patch) | |
| tree | cbf858f7c863ce51f5a3fbf34d39b6dee4a70dd3 | |
| parent | 2110e6de6b3b201cb78a2777d43e76ebaed35b78 (diff) | |
| download | pdf-as-4-475e1c0078f2026a2b395fef2ec85219013bde81.tar.gz pdf-as-4-475e1c0078f2026a2b395fef2ec85219013bde81.tar.bz2 pdf-as-4-475e1c0078f2026a2b395fef2ec85219013bde81.zip | |
map the legacy logback.configurationFile property to spring's logging.config (#88)
| -rw-r--r-- | build.gradle | 2 | ||||
| -rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle index c7506708..78c720e7 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ import com.github.spotbugs.snom.SpotBugsTask plugins { id "com.github.ben-manes.versions" version "0.51.0" apply false id "com.github.spotbugs" version "6.0.0" - id "com.github.jk1.dependency-license-report" version "3.1.2" + id "com.github.jk1.dependency-license-report" version "3.1.2" } licenseReport { diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java index e9ba88be..14b68956 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java @@ -1,5 +1,6 @@ package at.gv.egiz.pdfas.web; +import lombok.val; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; @@ -7,6 +8,19 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer @SpringBootApplication public class PdfAsWeb extends SpringBootServletInitializer { + + static { + // compatibility layer: map the old logback.configurationFile to the new logging.config + final String SPRING_LOG_CFG = "logging.config"; + final String LEGACY_LOGBACK_LOG_CFG = "logback.configurationFile"; + if (System.getProperty(SPRING_LOG_CFG) == null) { + val legacyValue = System.getProperty(LEGACY_LOGBACK_LOG_CFG); + if (legacyValue != null) { + System.setProperty(SPRING_LOG_CFG, legacyValue); + } + } + } + @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(PdfAsWeb.class); |
