Skip to content

Commit

Permalink
Configure jersey: disable wadl feature. Disable DATASOURCE provider d…
Browse files Browse the repository at this point in the history
…efault
  • Loading branch information
barchetta committed Dec 19, 2024
1 parent 2d6da13 commit be56db7
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
import org.glassfish.jersey.server.ContainerRequest;
import org.glassfish.jersey.server.ContainerResponse;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.server.ServerProperties;
import org.glassfish.jersey.server.spi.Container;
import org.glassfish.jersey.server.spi.ContainerResponseWriter;

Expand Down Expand Up @@ -96,6 +97,14 @@ private JaxRsService(ResourceConfig resourceConfig,

static JaxRsService create(ResourceConfig resourceConfig, InjectionManager injectionManager) {

// Silence warnings from Jersey. See 9019
if (!resourceConfig.hasProperty(CommonProperties.PROVIDER_DEFAULT_DISABLE)) {
resourceConfig.addProperties(Map.of(CommonProperties.PROVIDER_DEFAULT_DISABLE, "DATASOURCE"));
}
if (!resourceConfig.hasProperty(ServerProperties.WADL_FEATURE_DISABLE)) {
resourceConfig.addProperties(Map.of(ServerProperties.WADL_FEATURE_DISABLE, "true"));
}

InjectionManager ij = injectionManager == null ? null : new InjectionManagerWrapper(injectionManager, resourceConfig);
ApplicationHandler appHandler = new ApplicationHandler(resourceConfig,
new WebServerBinder(),
Expand Down

0 comments on commit be56db7

Please sign in to comment.