From 89c54f316cf9fe3a9df4c6dbf5cfd0d4698401c5 Mon Sep 17 00:00:00 2001 From: Aurdo Date: Thu, 4 Jun 2020 22:01:33 +0300 Subject: [PATCH] Fix BasicErrorController to use binding error cfg `server.error.include-binding-errors` had no effect on BasicErrorController.isIncludeBindingErrors(), due to wrong property being used --- .../autoconfigure/web/servlet/error/BasicErrorController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java index 5486cf9f1769..42bc6fa97c93 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java @@ -172,7 +172,7 @@ protected boolean isIncludeMessage(HttpServletRequest request, MediaType produce * @return if the errors attribute should be included */ protected boolean isIncludeBindingErrors(HttpServletRequest request, MediaType produces) { - switch (getErrorProperties().getIncludeMessage()) { + switch (getErrorProperties().getIncludeBindingErrors()) { case ALWAYS: return true; case ON_PARAM: