@@ -5499,21 +5499,22 @@ component-scan element. That means that the two components are autodetected and
5499
5499
wired together -- all without any bean configuration metadata provided in XML.
5500
5500
5501
5501
NOTE: You can disable the registration of `AutowiredAnnotationBeanPostProcessor` and
5502
- `CommonAnnotationBeanPostProcessor` by including the annotation-config attribute
5502
+ `CommonAnnotationBeanPostProcessor` by including the ` annotation-config` attribute
5503
5503
with a value of `false`.
5504
5504
5505
5505
5506
5506
5507
5507
[[beans-scanning-filters]]
5508
5508
=== Using Filters to Customize Scanning
5509
5509
5510
- By default, classes annotated with `@Component`, `@Repository`, `@Service`,
5511
- `@Controller`, or a custom annotation that itself is annotated with `@Component` are the
5512
- only detected candidate components. However, you can modify and extend this behavior
5513
- by applying custom filters. Add them as `includeFilters` or `excludeFilters`
5514
- parameters of the `@ComponentScan` annotation (or as `include-filter` or `exclude-filter`
5515
- child elements of the `component-scan` element). Each filter element requires the `type`
5516
- and `expression` attributes. The following table describes the filtering options:
5510
+ By default, classes annotated with `@Component`, `@Repository`, `@Service`, `@Controller`,
5511
+ `@Configuration`, or a custom annotation that itself is annotated with `@Component` are
5512
+ the only detected candidate components. However, you can modify and extend this behavior
5513
+ by applying custom filters. Add them as `includeFilters` or `excludeFilters` attributes of
5514
+ the `@ComponentScan` annotation (or as `<context:include-filter />` or
5515
+ `<context:exclude-filter />` child elements of the `<context:component-scan>` element in
5516
+ XML configuration). Each filter element requires the `type` and `expression` attributes.
5517
+ The following table describes the filtering options:
5517
5518
5518
5519
[[beans-scanning-filters-tbl]]
5519
5520
.Filter Types
@@ -5522,7 +5523,7 @@ and `expression` attributes. The following table describes the filtering options
5522
5523
5523
5524
| annotation (default)
5524
5525
| `org.example.SomeAnnotation`
5525
- | An annotation to be present at the type level in target components.
5526
+ | An annotation to be _present_ or _meta-present_ at the type level in target components.
5526
5527
5527
5528
| assignable
5528
5529
| `org.example.SomeClass`
@@ -5534,11 +5535,11 @@ and `expression` attributes. The following table describes the filtering options
5534
5535
5535
5536
| regex
5536
5537
| `org\.example\.Default.*`
5537
- | A regex expression to be matched by the target components class names.
5538
+ | A regex expression to be matched by the target components' class names.
5538
5539
5539
5540
| custom
5540
5541
| `org.example.MyTypeFilter`
5541
- | A custom implementation of the `org.springframework.core.type .TypeFilter` interface.
5542
+ | A custom implementation of the `org.springframework.core.type.TypeFilter` interface.
5542
5543
|===
5543
5544
5544
5545
The following example shows the configuration ignoring all `@Repository` annotations
@@ -5571,10 +5572,11 @@ The following listing shows the equivalent XML:
5571
5572
</beans>
5572
5573
----
5573
5574
5574
- NOTE: You can also disable the default filters by setting `useDefaultFilters=false` on the annotation or
5575
- by providing `use-default-filters="false"` as an attribute of the `<component-scan/>` element. This,
5576
- in effect, disables automatic detection of classes annotated with `@Component`, `@Repository`,
5577
- `@Service`, `@Controller`, or `@Configuration`.
5575
+ NOTE: You can also disable the default filters by setting `useDefaultFilters=false` on the
5576
+ annotation or by providing `use-default-filters="false"` as an attribute of the
5577
+ `<component-scan/>` element. This effectively disables automatic detection of classes
5578
+ annotated or meta-annotated with `@Component`, `@Repository`, `@Service`, `@Controller`,
5579
+ `@RestController`, or `@Configuration`.
5578
5580
5579
5581
5580
5582
0 commit comments