JAVA-86: spring-boot-custom-error-page

This commit is contained in:
Krzysiek
2020-03-15 16:55:18 +01:00
parent fff4be33f0
commit 9a4f4e47dc
11 changed files with 137 additions and 0 deletions
@@ -0,0 +1,10 @@
#server
server.port=9000
server.servlet-path=/
server.context-path=/
server.error.whitelabel.enabled=false
#spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration
#for Spring Boot 2.0+
#spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration
@@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
<body>
<h1> Sorry, we couldn't find the page you were looking for. </h1>
<p><a href="/">Go Home</a></p>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<body>
<h1> Sorry, something went wrong! </h1>
<h2>We're fixing it.</h2>
<p><a href="/">Go Home</a></p>
</body>
</html>
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<body>
<h1> Something went wrong! </h1>
<h2>Our Engineers are on it.</h2>
<p><a href="/">Go Home</a></p>
</body>
</html>
@@ -0,0 +1,8 @@
<html>
<head>
<title>RESOURCE NOT FOUND</title>
</head>
<body>
<h1>404 RESOURCE NOT FOUND</h1>
</body>
</html>
@@ -0,0 +1,6 @@
<html>
<body>
<h1>Welcome Home</h1>
<p><strong>Success!</strong> It is working as we expected.</p>
</body>
</html>