From 9ec26d632cc75b23a4405881c811c37b7a2ccacb Mon Sep 17 00:00:00 2001 From: Tomasz Wielga Date: Wed, 4 Feb 2015 13:09:38 +0100 Subject: [PATCH] declarative linking enabled --- build.gradle | 4 ++-- src/main/java/pl/ctrlpkw/JerseyConfig.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index bf4569c..b98f997 100644 --- a/build.gradle +++ b/build.gradle @@ -46,8 +46,8 @@ dependencies { compile("org.springframework.plugin:spring-plugin-core:1.1.0.RELEASE") compile("org.apache.commons:commons-lang3:3.3.2") - //compile('org.glassfish.jersey.ext:jersey-declarative-linking:2.16-SNAPSHOT') - compile('org.glassfish.jersey.ext:jersey-declarative-linking:2.15') + compile('org.glassfish.jersey.ext:jersey-declarative-linking:2.16-SNAPSHOT') + //compile('org.glassfish.jersey.ext:jersey-declarative-linking:2.15') compile('org.glassfish.jersey.ext:jersey-bean-validation:2.15') compile("com.fasterxml.jackson.datatype:jackson-datatype-joda:2.3.2") diff --git a/src/main/java/pl/ctrlpkw/JerseyConfig.java b/src/main/java/pl/ctrlpkw/JerseyConfig.java index 2274f28..6374de0 100644 --- a/src/main/java/pl/ctrlpkw/JerseyConfig.java +++ b/src/main/java/pl/ctrlpkw/JerseyConfig.java @@ -1,5 +1,6 @@ package pl.ctrlpkw; +import org.glassfish.jersey.linking.DeclarativeLinkingFeature; import pl.ctrlpkw.api.ObjectMapperProvider; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.server.ServerProperties; @@ -16,7 +17,7 @@ public JerseyConfig() { register(ObjectMapperProvider.class); //Declarative linking need the patched version of Jersey - //register(DeclarativeLinkingFeature.class); + register(DeclarativeLinkingFeature.class); property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true); }