From efff6efe0d40e41fc6090706c5e55fbbbc8f67f6 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Tue, 28 May 2024 17:17:51 +0200 Subject: [PATCH] Improved project --- {src/main/webapp => gcube/extra-resources}/WEB-INF/web.xml | 6 ++---- pom.xml | 3 ++- .../helloworld/rest/ExcludeAuthorizationService.java | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) rename {src/main/webapp => gcube/extra-resources}/WEB-INF/web.xml (87%) diff --git a/src/main/webapp/WEB-INF/web.xml b/gcube/extra-resources/WEB-INF/web.xml similarity index 87% rename from src/main/webapp/WEB-INF/web.xml rename to gcube/extra-resources/WEB-INF/web.xml index 70eff44..bf74d0a 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/gcube/extra-resources/WEB-INF/web.xml @@ -3,10 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0"> - Helloword Smartgears4 Service - - A gcube service - smartgears 4 - + ${project.name} + ${project.description} helloword org.glassfish.jersey.servlet.ServletContainer diff --git a/pom.xml b/pom.xml index 241f82c..03cf9a0 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,8 @@ hello-world-service 1.0.0-SNAPSHOT Hello World Service - Hello World Service is used as reference project template for Smartgears 4 based services. DO NOT use tabs of new lines here otherwise it corrupts application.yaml file + + Hello World Service is used as reference project template for Smartgears 4 based services. war diff --git a/src/main/java/org/gcube/service/helloworld/rest/ExcludeAuthorizationService.java b/src/main/java/org/gcube/service/helloworld/rest/ExcludeAuthorizationService.java index d67720c..ce607ef 100644 --- a/src/main/java/org/gcube/service/helloworld/rest/ExcludeAuthorizationService.java +++ b/src/main/java/org/gcube/service/helloworld/rest/ExcludeAuthorizationService.java @@ -38,13 +38,13 @@ public class ExcludeAuthorizationService { @GET @Path("bad-request") public String badRequest() throws WebApplicationException { - throw new BadRequestException(); + throw new BadRequestException("Your request is not valid"); } @GET @Path("not-found") public String notFound() throws WebApplicationException { - throw new NotFoundException(); + throw new NotFoundException("Not found sorry"); } @PURGE