Update 64.10. Configure Jetty.md

master
qibaoguang 2015-03-24 00:33:26 +08:00
parent 72072e861b
commit 74c3659ad6
1 changed files with 0 additions and 10 deletions

View File

@ -1,11 +1 @@
### 64.10. 禁止注册Servlet或Filter
正如[以上讨论](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#howto-add-a-servlet-filter-or-servletcontextlistener)的任何Servlet或Filter beans将被自动注册到servlet容器中。为了禁止注册一个特殊的Filter或Servlet bean可以为它创建一个注册bean然后禁用该bean。例如
```java
@Bean
public FilterRegistrationBean registration(MyFilter filter) {
FilterRegistrationBean registration = new FilterRegistrationBean(filter);
registration.setEnabled(false);
return registration;
}
```