From b53af0a722a9fad91a61e102db04a2fb5116c8be Mon Sep 17 00:00:00 2001 From: Ivar Grimstad Date: Thu, 26 Oct 2023 13:58:35 +0200 Subject: [PATCH 1/2] Use annotation based Jakarta REST config --- .../archetype-resources/src/main/webapp/WEB-INF/web.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml index 0fcfa57f..472d2242 100644 --- a/archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml +++ b/archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml @@ -15,13 +15,6 @@ xmlns="$xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="$schemaLocation"> - - ${eePackage}.ws.rs.core.Application - - - ${eePackage}.ws.rs.core.Application - /rest/* - index.html From 577cf3dbbf74ac37324882ecd438d35bc1a06167 Mon Sep 17 00:00:00 2001 From: Ivar Grimstad Date: Thu, 26 Oct 2023 14:14:05 +0200 Subject: [PATCH 2/2] Add config class --- .../src/main/java/jakarta/hello/HelloApplication.java | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 archetype/src/main/resources/archetype-resources/src/main/java/jakarta/hello/HelloApplication.java diff --git a/archetype/src/main/resources/archetype-resources/src/main/java/jakarta/hello/HelloApplication.java b/archetype/src/main/resources/archetype-resources/src/main/java/jakarta/hello/HelloApplication.java new file mode 100644 index 00000000..7b1b2c74 --- /dev/null +++ b/archetype/src/main/resources/archetype-resources/src/main/java/jakarta/hello/HelloApplication.java @@ -0,0 +1,9 @@ +package ${package}.jakarta.hello; + +import ${eePackage}.ws.rs.core.Application; +import ${eePackage}.ws.rs.ApplicationPath; + +@ApplicationPath("rest") +public class HelloApplication extends Application { + +}