Enable logging of resolved exceptions

Previously, if an exception was resolved by a `HandlerExceptionResolver`
nothing the log indicated a failure to process the query.

This commit adds a new property `spring.mvc.log-resolved-exception` that
enables warning logs for supported `HandlerExceptionResolver` instances.

When Devtools is enabled, this flag is enabled by default.

Closes gh-2176
This commit is contained in:
Stephane Nicoll
2016-05-24 13:34:22 +02:00
parent 1175879fcc
commit 5656e83ba9
5 changed files with 73 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,6 +52,7 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro
properties.put("spring.h2.console.enabled", "true");
properties.put("spring.resources.cache-period", "0");
properties.put("spring.template.provider.cache", "false");
properties.put("spring.mvc.log-resolved-exception", "true");
PROPERTIES = Collections.unmodifiableMap(properties);
}