Browse Source

Polishing

pull/1920/merge
Juergen Hoeller 6 years ago
parent
commit
5d7fb1a1c2
  1. 8
      spring-beans/spring-beans.gradle
  2. 6
      spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java

8
spring-beans/spring-beans.gradle

@ -12,8 +12,7 @@ dependencies { @@ -12,8 +12,7 @@ dependencies {
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
}
// This modules does joint compilation for Java and Groovy code,
// with the compileGroovy task.
// This module does joint compilation for Java and Groovy code with the compileGroovy task.
sourceSets {
main.groovy.srcDirs += "src/main/java"
main.java.srcDirs = []
@ -24,9 +23,8 @@ compileGroovy { @@ -24,9 +23,8 @@ compileGroovy {
targetCompatibility = 1.8
}
// This module also builds Kotlin code and the compileKotlin task
// naturally depends on compileJava.
// We need to redefine dependencies to break task cycles.
// This module also builds Kotlin code and the compileKotlin task naturally depends on
// compileJava. We need to redefine dependencies to break task cycles.
def deps = compileGroovy.taskDependencies.immutableValues + compileGroovy.taskDependencies.mutableValues
compileGroovy.dependsOn = deps - 'compileJava'
compileKotlin.dependsOn(compileGroovy)

6
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java

@ -135,13 +135,11 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti @@ -135,13 +135,11 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti
prepareResponse(ex, response);
ModelAndView result = doResolveException(request, response, handler, ex);
if (result != null) {
// Print warn message, when warn logger is not enabled..
// Print warn message when warn logger is not enabled...
if (logger.isWarnEnabled() && (this.warnLogger == null || !this.warnLogger.isWarnEnabled())) {
logger.warn("Resolved [" + ex + "]" + (result.isEmpty() ? "" : " to " + result));
}
// warnLogger with full stack trace (requires explicit config)..
// warnLogger with full stack trace (requires explicit config)
logException(ex, request);
}
return result;

Loading…
Cancel
Save