Browse Source

Fix BasicErrorController include parameter parsing

This commit fixes an error in BasicErrorController where the wrong
property was referenced for binding error inclusion.

See gh-21702
pull/21793/head
Aurdo 6 years ago committed by Scott Frederick
parent
commit
e2e52a11cc
  1. 2
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java

2
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java

@ -172,7 +172,7 @@ public class BasicErrorController extends AbstractErrorController { @@ -172,7 +172,7 @@ public class BasicErrorController extends AbstractErrorController {
* @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:

Loading…
Cancel
Save