Arreglada la vista de error

This commit is contained in:
David 2021-03-24 12:56:46 +01:00
parent ea546e458c
commit ecaf01100a
3 changed files with 7 additions and 6 deletions

View file

@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class CrashController {
@GetMapping("/oups")
@GetMapping(value="/oups")
public String triggerException() {
throw new RuntimeException(
"Expected: controller used to showcase what " + "happens when an exception is thrown");

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 KiB

View file

@ -2,13 +2,14 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %>
<cheapy:layout pageName="error">
<spring:url value="/resources/images/pets.png" var="petsImage"/>
<img src="${petsImage}"/>
<h2>Something happened...</h2>
<h2>Algo malo ha pasado...</h2>
<spring:url value="/resources/images/Logo Cheapy.png" htmlEscape="true" var="cheapyImage"/>
<img class="img-responsive" src="${cheapyImage}"/>
<p>${exception.message}</p>
</cheapy:layout>