From 254319fb306b3e4595751ca67d3bec1a2658c933 Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Sun, 2 Aug 2020 23:17:57 +0530 Subject: [PATCH] JAVA-2297: Update "Spring Boot custom error page" article --- .../spring-boot-basic-customization/pom.xml | 10 ++++++---- .../errorhandling/controllers/MyErrorController.java | 2 +- .../src/main/resources/application.properties | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/spring-boot-modules/spring-boot-basic-customization/pom.xml b/spring-boot-modules/spring-boot-basic-customization/pom.xml index fc34994a85..2a4b321c5f 100644 --- a/spring-boot-modules/spring-boot-basic-customization/pom.xml +++ b/spring-boot-modules/spring-boot-basic-customization/pom.xml @@ -4,11 +4,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + - com.baeldung.spring-boot-modules - spring-boot-modules - 1.0.0-SNAPSHOT - ../ + org.springframework.boot + spring-boot-starter-parent + 2.3.2.RELEASE + spring-boot-basic-customization diff --git a/spring-boot-modules/spring-boot-basic-customization/src/main/java/com/baeldung/errorhandling/controllers/MyErrorController.java b/spring-boot-modules/spring-boot-basic-customization/src/main/java/com/baeldung/errorhandling/controllers/MyErrorController.java index e002ac045d..8a7a3d6e45 100644 --- a/spring-boot-modules/spring-boot-basic-customization/src/main/java/com/baeldung/errorhandling/controllers/MyErrorController.java +++ b/spring-boot-modules/spring-boot-basic-customization/src/main/java/com/baeldung/errorhandling/controllers/MyErrorController.java @@ -34,7 +34,7 @@ public class MyErrorController implements ErrorController { @Override public String getErrorPath() { - return "/error"; + return null; } } diff --git a/spring-boot-modules/spring-boot-basic-customization/src/main/resources/application.properties b/spring-boot-modules/spring-boot-basic-customization/src/main/resources/application.properties index 4d4a6ec7bd..53f13c4767 100644 --- a/spring-boot-modules/spring-boot-basic-customization/src/main/resources/application.properties +++ b/spring-boot-modules/spring-boot-basic-customization/src/main/resources/application.properties @@ -5,3 +5,4 @@ #spring.banner.image.height= //TODO #spring.banner.image.margin= //TODO #spring.banner.image.invert= //TODO +server.error.path=/error