Skip to content

Commit b4d6ac1

Browse files
committed
Fix javadoc
1 parent e6d1b2c commit b4d6ac1

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/ConditionalOnMissingFilterBean.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,24 @@
3737
* {@link FilterRegistrationBean}.
3838
* <p>
3939
* When placed on a {@code @Bean} method, the bean class defaults to the return type of
40-
* the factory method:
40+
* the factory method or the type of the {@link Filter} if the bean is a
41+
* {@link FilterRegistrationBean}:
42+
*
43+
* <pre class="code">
44+
* &#064;Configuration
45+
* public class MyAutoConfiguration {
46+
*
47+
* &#064;ConditionalOnMissingFilterBean
48+
* &#064;Bean
49+
* public MyFilter myFilter() {
50+
* ...
51+
* }
52+
*
53+
* }</pre>
54+
* <p>
55+
* In the sample above the condition will match if no bean of type {@code MyFilter} or
56+
* {@code FilterRegistrationBean<MyFilter>} is already contained in the
57+
* {@link BeanFactory}.
4158
*
4259
* @author Phillip Webb
4360
* @since 2.1.0

0 commit comments

Comments
 (0)