import org.springframework.boot.web.servlet.error.ErrorAttributes;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.util.Assert;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.ServletWebRequest;
import org.springframework.web.context.request.WebRequest;
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
- private static final String ERROR_PATH = "/error";
+ public static final String ERROR_PATH = "/error";
private static final String TRACE = "trace";
private final ErrorAttributes errorAttributes;
* HttpServletRequest
* @return Map of String to Object
*/
- @RequestMapping(ERROR_PATH)
+ @GetMapping(ERROR_PATH)
public Map<String, Object> error(HttpServletRequest aRequest) {
Map<String, Object> body = getErrorAttributes(aRequest, getTraceParameter(aRequest));
logger.warn("Failed in request for {}", body.get("path"));