From 8a6bf62126cd6c4b2c2220bc444035656ad75e7a Mon Sep 17 00:00:00 2001 From: Davide Cerbo Date: Thu, 17 Nov 2016 18:39:21 +0100 Subject: [PATCH] fixed import, updated gitignore and pom.xml with candidate release --- .gitignore | 10 ++++++++++ .../src/main/java/resource/HelloResource.java | 9 +++++++++ pom.xml | 6 ++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 32858aa..429d9a0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,15 @@ *.war *.ear +# java target folder +target/ + +# example folder used in development to test the archetype +/example/ + +#IntelliJ Idea folder +/.idea/ +*.iml + # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* diff --git a/nut-archetype/src/main/resources/archetype-resources/src/main/java/resource/HelloResource.java b/nut-archetype/src/main/resources/archetype-resources/src/main/java/resource/HelloResource.java index 6399e4c..35ba6cb 100644 --- a/nut-archetype/src/main/resources/archetype-resources/src/main/java/resource/HelloResource.java +++ b/nut-archetype/src/main/resources/archetype-resources/src/main/java/resource/HelloResource.java @@ -9,6 +9,9 @@ import com.orientechnologies.orient.object.db.OObjectDatabaseTx; import io.swagger.annotations.Api; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import javax.inject.Inject; import javax.ws.rs.*; import javax.ws.rs.client.Client; @@ -28,6 +31,12 @@ public class HelloResource @Inject OObjectDatabaseTx db; + @GET + @Path("/{user}/error") + public User error(@PathParam("user") String username){ + throw new RuntimeException("errore!!!"); + } + @GET @Path("/{user}") public User get(@PathParam("user") String username) diff --git a/pom.xml b/pom.xml index 9c3590d..4880eb6 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,9 @@ nut-metrics nut-utils nut-archetype - + nut-errors + nutex + 3.0.13.Final @@ -186,4 +188,4 @@ - + \ No newline at end of file