Polish serialization/deserialization exception logging
This commit introduces the following changes in AbstractHandlerExceptionResolver: - warnLogger used to log exception is enabled by default - the exception message is now logged instead of the whole exception stacktrace - warn logging is only performed if doResolveException() returns a non-null ModelAndView, in order to avoid logging multiple times the error Issue: SPR-13100
This commit is contained in:
@@ -56,6 +56,7 @@ import org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMeth
|
||||
import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
/**
|
||||
* Test fixture for {@link ResponseEntityExceptionHandler}.
|
||||
@@ -179,7 +180,7 @@ public class ResponseEntityExceptionHandlerTests {
|
||||
|
||||
@Test
|
||||
public void methodArgumentNotValid() {
|
||||
Exception ex = new MethodArgumentNotValidException(null, null);
|
||||
Exception ex = Mockito.mock(MethodArgumentNotValidException.class);
|
||||
testException(ex);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user