26 lines
676 B
Java
26 lines
676 B
Java
|
package eu.eudat.controllers;
|
||
|
|
||
|
import org.springframework.boot.autoconfigure.web.ErrorController;
|
||
|
import org.springframework.stereotype.Controller;
|
||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
||
|
/**
|
||
|
* Created by ikalyvas on 1/16/2018.
|
||
|
*/
|
||
|
@Controller
|
||
|
public class CustomErrorController implements ErrorController{
|
||
|
|
||
|
@RequestMapping(value = "/error")
|
||
|
public String error(HttpServletRequest request, HttpServletResponse response) {
|
||
|
return "forward:/index.html";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String getErrorPath() {
|
||
|
return "/error";
|
||
|
}
|
||
|
}
|