aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2026-06-19 12:18:14 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2026-06-19 12:18:14 +0200
commit10e5c02b52c59c7a3bddc661f826c1bba08a64e0 (patch)
tree17fabf6f454981889a1285186b9fe9f5a9bc4818
parentce9f7ae9d70582bb07e1436360b1eab927c81bf0 (diff)
downloadpdf-as-4-10e5c02b52c59c7a3bddc661f826c1bba08a64e0.tar.gz
pdf-as-4-10e5c02b52c59c7a3bddc661f826c1bba08a64e0.tar.bz2
pdf-as-4-10e5c02b52c59c7a3bddc661f826c1bba08a64e0.zip
fix(core): remove embedded Tomcat dependency
Reason: application is deployed to an external Apache Tomcat server
-rw-r--r--build.gradle5
-rw-r--r--pdf-as-web/build.gradle8
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/web_xml_bridges/ContextXmlBridge.java20
-rw-r--r--pdf-as-web/src/main/resources/META-INF/context.xml5
4 files changed, 15 insertions, 23 deletions
diff --git a/build.gradle b/build.gradle
index f7bd89f2..92c9649c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -191,6 +191,11 @@ subprojects {
}
dependencies {
+ implementation platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
+ annotationProcessor platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
+ testImplementation platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
+ testRuntimeOnly platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
+
implementation group: 'org.projectlombok', name: 'lombok', version: lombokVersion
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: lombokVersion
testAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: lombokVersion
diff --git a/pdf-as-web/build.gradle b/pdf-as-web/build.gradle
index 8b40583d..90171634 100644
--- a/pdf-as-web/build.gradle
+++ b/pdf-as-web/build.gradle
@@ -76,12 +76,14 @@ dependencies {
api group: 'org.json', name: 'json', version: jsonVersion
api group: 'jakarta.jws', name: 'jakarta.jws-api', version: jakartaJwsVersion
compileOnly group: 'jakarta.servlet', name: 'jakarta.servlet-api', version: jakartaServletVersion
- implementation group: 'org.springframework.boot', name: 'spring-boot-starter-webmvc', version: springBootVersion
- providedRuntime group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat-runtime', version: springBootVersion
+ implementation(group: 'org.springframework.boot', name: 'spring-boot-starter-webmvc', version: springBootVersion) {
+ exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
+ }
+ compileOnly "org.apache.tomcat.embed:tomcat-embed-core"
+ implementation group: 'org.springframework.boot', name: 'spring-boot-web-server', version: springBootVersion
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: springBootVersion
implementation group: 'de.codecentric', name: 'spring-boot-admin-client', version: springBootAdminVersion
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.3'
- providedRuntime group: 'org.apache.tomcat.embed', name: 'tomcat-embed-jasper', version: tomcatVersion
implementation 'jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.2'
implementation 'org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1'
implementation 'tools.jackson.module:jackson-module-jakarta-xmlbind-annotations'
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/web_xml_bridges/ContextXmlBridge.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/web_xml_bridges/ContextXmlBridge.java
deleted file mode 100644
index 853920e0..00000000
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/web_xml_bridges/ContextXmlBridge.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package at.gv.egiz.pdfas.web.web_xml_bridges;
-
-import lombok.val;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/** translates the tomcat context.xml file for spring embedded tomcat */
-@Configuration
-@ConditionalOnClass(name = "org.springframework.boot.tomcat.TomcatContextCustomizer")
-public class ContextXmlBridge {
- @Bean
- public org.springframework.boot.tomcat.TomcatContextCustomizer sameSiteNone() {
- return ctx -> {
- val processor = new org.apache.tomcat.util.http.Rfc6265CookieProcessor();
- processor.setSameSiteCookies("none");
- ctx.setCookieProcessor(processor);
- };
- }
-}
diff --git a/pdf-as-web/src/main/resources/META-INF/context.xml b/pdf-as-web/src/main/resources/META-INF/context.xml
new file mode 100644
index 00000000..2f504fcb
--- /dev/null
+++ b/pdf-as-web/src/main/resources/META-INF/context.xml
@@ -0,0 +1,5 @@
+<Context>
+ <CookieProcessor
+ className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"
+ sameSiteCookies="none" />
+</Context> \ No newline at end of file