@@ -3746,16 +3746,16 @@ Thus, beans can programmatically manipulate the `ApplicationContext` that create
3746
3746
through the `ApplicationContext` interface or by casting the reference to a known
3747
3747
subclass of this interface (such as `ConfigurableApplicationContext`, which exposes
3748
3748
additional functionality). One use would be the programmatic retrieval of other beans.
3749
- Sometimes this capability is useful. However, in general, you should avoid it, because it
3750
- couples the code to Spring and does not follow the Inversion of Control style, where
3751
- collaborators are provided to beans as properties. Other methods of the
3752
- `ApplicationContext` provide access to file resources, publishing application events, and
3753
- accessing a `MessageSource`. These additional features are described in
3749
+ Sometimes this capability is useful. However, in general, you should avoid it, because
3750
+ it couples the code to Spring and does not follow the Inversion of Control style,
3751
+ where collaborators are provided to beans as properties. Other methods of the
3752
+ `ApplicationContext` provide access to file resources, publishing application events,
3753
+ and accessing a `MessageSource`. These additional features are described in
3754
3754
<<context-introduction>>.
3755
3755
3756
3756
As of Spring 2.5, autowiring is another alternative to obtain a reference to the
3757
- `ApplicationContext`. The "`traditional`" `constructor` and `byType` autowiring modes (as
3758
- described in <<beans-factory-autowire>>) can provide a dependency of type
3757
+ `ApplicationContext`. The "`traditional`" `constructor` and `byType` autowiring modes
3758
+ (as described in <<beans-factory-autowire>>) can provide a dependency of type
3759
3759
`ApplicationContext` for a constructor argument or a setter method parameter,
3760
3760
respectively. For more flexibility, including the ability to autowire fields and
3761
3761
multiple parameter methods, use the new annotation-based autowiring features. If you do,
@@ -3789,11 +3789,10 @@ init-method.
3789
3789
[[aware-list]]
3790
3790
=== Other `Aware` Interfaces
3791
3791
3792
- Besides `ApplicationContextAware` and `BeanNameAware` (discussed
3793
- <<beans-factory-aware,earlier>>), Spring offers a range of `Aware` interfaces that let
3794
- beans indicate to the container that they require a certain infrastructure dependency. As
3795
- a general rule, the name is a good indication of the dependency type. The following table
3796
- summarizes the most important `Aware` interfaces:
3792
+ Besides `ApplicationContextAware` and `BeanNameAware` (discussed <<beans-factory-aware,earlier>>),
3793
+ Spring offers a wide range of `Aware` callback interfaces that let beans indicate to the container
3794
+ that they require a certain infrastructure dependency. As a general rule, the name indicates the
3795
+ dependency type. The following table summarizes the most important `Aware` interfaces:
3797
3796
3798
3797
[[beans-factory-nature-aware-list]]
3799
3798
.Aware interfaces
@@ -3822,7 +3821,7 @@ summarizes the most important `Aware` interfaces:
3822
3821
3823
3822
| `BootstrapContextAware`
3824
3823
| Resource adapter `BootstrapContext` the container runs in. Typically available only in
3825
- JCA aware `ApplicationContext` instances.
3824
+ JCA- aware `ApplicationContext` instances.
3826
3825
| <<integration.adoc#cci, JCA CCI>>
3827
3826
3828
3827
| `LoadTimeWeaverAware`
@@ -9336,19 +9335,18 @@ specific and appropriate to the actual application context type.
9336
9335
9337
9336
You can configure a bean deployed into the application context to implement the special
9338
9337
callback interface, `ResourceLoaderAware`, to be automatically called back at
9339
- initialization time with the application context itself passed in as the
9340
- `ResourceLoader`. You can also expose properties of type `Resource`, to be used to
9341
- access static resources. They are injected into it like any other properties. You
9342
- can specify those `Resource` properties as simple `String` paths and rely on a special
9343
- JavaBean `PropertyEditor` (which is automatically registered by the context) to convert
9344
- those text strings to actual `Resource` objects when the bean is deployed.
9338
+ initialization time with the application context itself passed in as the `ResourceLoader`.
9339
+ You can also expose properties of type `Resource`, to be used to access static resources.
9340
+ They are injected into it like any other properties. You can specify those `Resource`
9341
+ properties as simple `String` paths and rely on automatic conversion from those text
9342
+ strings to actual `Resource` objects when the bean is deployed.
9345
9343
9346
9344
The location path or paths supplied to an `ApplicationContext` constructor are actually
9347
- resource strings and, in simple form, are treated appropriately according to the specific context
9348
- implementation. For example `ClassPathXmlApplicationContext` treats a simple location path as a
9349
- classpath location. You can also use location paths (resource strings) with special
9350
- prefixes to force loading of definitions from the classpath or a URL, regardless of the
9351
- actual context type.
9345
+ resource strings and, in simple form, are treated appropriately according to the specific
9346
+ context implementation. For example `ClassPathXmlApplicationContext` treats a simple
9347
+ location path as a classpath location. You can also use location paths (resource strings)
9348
+ with special prefixes to force loading of definitions from the classpath or a URL,
9349
+ regardless of the actual context type.
9352
9350
9353
9351
9354
9352
0 commit comments