This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<name>Dropwizard Test</name> | |
<groupId>com.sagedevices.dropwizard</groupId> | |
<artifactId>dropwizard-test</artifactId> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sagedevices.platform.jersey.core; | |
import com.sagedevices.platform.api.util.StringUtil; | |
public class RequestId { | |
public static final String HEADER_NAME_ORIGIN = "X-Origin-Request-Id"; | |
public static final String HEADER_NAME_LOCAL = "X-Local-Request-Id"; | |
public static final String MDC_NAME_LOCAL = "LocalRequestId"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Replaces the DropWizard exception mappers with our own mappers that return exceptions in JSON format | |
* @param environment | |
*/ | |
private void configureExceptionMappers(Environment environment) { | |
ResourceConfig jrConfig = environment.jersey().getResourceConfig(); | |
Set<Object> dwSingletons = jrConfig.getSingletons(); | |
List<ExceptionMapper> singletonsToRemove = new ArrayList<>(); |
OlderNewer