diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index b6ac37d47d5..c1eb7461ae2 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1285,7 +1285,7 @@ If the above customization techniques are too limited, you can register the TomcatEmbeddedServletContainerFactory factory = new TomcatEmbeddedServletContainerFactory(); factory.setPort(9000); factory.setSessionTimeout(10, TimeUnit.MINUTES); - factory.addErrorPages(new ErrorPage(HttpStatus.404, "/notfound.html"); + factory.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/notfound.html"); return factory; } ----