Polish formatting
This commit is contained in:
parent
c420249f7d
commit
142216400a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue