title: Why Spring Boot 4 "custom error page" fails 404?
body: <p>I tried to implement an own error page handling.But my page doesnt show up.
  Controller:</p>
  
  <pre><code>@Controller
  public class MyCustomErrorController implements ErrorController {
  
  @RequestMapping(value = "/error", method = RequestMethod.GET)
  public String handleError() {
  
      return "error";
  }
  
  @Override
  public String getErrorPath() {
  
      return "/error";
  }}
  </code></pre>
  
  <p>I did my own error.html file in src/main/resources/static/html.
  The html folder is created by myself. Where is the problem? </p>
  
  <pre><code>&lt;dependencies&gt;
          &lt;dependency&gt;
               &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
               &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
              &lt;!-- &lt;scope&gt;provided&lt;/scope&gt; --&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  </code></pre>