From 142216400a3497bd798ca24d4ae4eebc2ec76ae2 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 24 Sep 2014 12:04:40 -0700 Subject: [PATCH] Polish formatting --- .../main/asciidoc/spring-boot-features.adoc | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) 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 227e85684e5..0457c264469 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -998,26 +998,28 @@ You can also use regular Spring MVC features like http://docs.spring.io/spring/d methods] and http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#mvc-ann-controller-advice[`@ControllerAdvice`]. The `ErrorController` will then pick up any unhandled exceptions. -N.B. if you register an `ErrorPage` with a path that will end up being handled by a `Filter` (e.g. as is common with some non-Spring web frameworks, -like Jersey and Wicket), then the `Filter` has to be explicitly registered as an `ERROR` dispatcher, e.g. +N.B. if you register an `ErrorPage` with a path that will end up being handled by a +`Filter` (e.g. as is common with some non-Spring web frameworks, like Jersey and Wicket), +then the `Filter` has to be explicitly registered as an `ERROR` dispatcher, e.g. [source,java,indent=0,subs="verbatim,quotes,attributes"] ---- -@Bean -public FilterRegistrationBean myFilter() { + @Bean + public FilterRegistrationBean myFilter() { - FilterRegistrationBean registration = new FilterRegistrationBean(); - registration.setFilter(new MyFilter()); - ... - registration.setDispatcherTypes(EnumSet.allOf(DispatcherType.class)); - return registration; + FilterRegistrationBean registration = new FilterRegistrationBean(); + registration.setFilter(new MyFilter()); + ... + registration.setDispatcherTypes(EnumSet.allOf(DispatcherType.class)); + return registration; -} + } ---- (the default `FilterRegistrationBean` does not include the `ERROR` dispatcher type). + [[boot-features-embedded-container]] === Embedded servlet container support Spring Boot includes support for embedded Tomcat and Jetty servers. Most developers will