title: How to replace ErrorController deprecated function on Spring Boot?
body: <p>Have a custom error controller on Spring boot:</p>
  
  <pre class="lang-java prettyprint-override"><code>package com.example.controllers;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.boot.web.servlet.error.ErrorController;
  import javax.servlet.http.HttpServletRequest;
  
  
  @Controller
  public class CustomErrorController implements ErrorController
  {
      @RequestMapping("/error")
      public String handleError(HttpServletRequest request)
      {
          ...
      }
  
      @Override
      public String getErrorPath()
      {
          return "/error";
      }
  }
  </code></pre>
  
  <p>But, when compile says: <code>getErrorPath() in ErrorController has been deprecated</code>. Ok, i found information: use <code>server.error.path</code> property. Ok, add this in <code>application.properties</code> and delete the function, but now says: <code>CustomErrorController is not abstract and does not override abstract method getErrorPath() in ErrorController</code>, ¿need a deprecated function?.</p>
  
  <p>How to made the custom error controller?, the <code>ErrorController</code> requires <code>getErrorPath</code> but it is deprecated, what is the correct alternative?.</p>