@@ -545,21 +545,21 @@ XML-based configuration metadata, you can use the `<alias/>` element to accompli
545545 <alias name="fromName" alias="toName"/>
546546----
547547
548- In this case, a bean in the same container which is named `fromName`, may also,
548+ In this case, a bean ( in the same container) named `fromName` may also,
549549after the use of this alias definition, be referred to as `toName`.
550550
551- For example, the configuration metadata for subsystem A may refer to a DataSource via
552- the name `subsystemA-dataSource`. The configuration metadata for subsystem B may refer to
553- a DataSource via the name `subsystemB-dataSource`. When composing the main application
554- that uses both these subsystems the main application refers to the DataSource via the
555- name `myApp-dataSource`. To have all three names refer to the same object you add to the
556- MyApp configuration metadata the following aliases definitions:
551+ For example, the configuration metadata for subsystem A may refer to a DataSource by the
552+ name of `subsystemA-dataSource`. The configuration metadata for subsystem B may refer to
553+ a DataSource by the name of `subsystemB-dataSource`. When composing the main application
554+ that uses both these subsystems, the main application refers to the DataSource by the
555+ name of `myApp-dataSource`. To have all three names refer to the same object, you can
556+ add the following alias definitions to the configuration metadata :
557557
558558[source,xml,indent=0]
559559[subs="verbatim,quotes"]
560560----
561- <alias name="subsystemA -dataSource" alias="subsystemB -dataSource"/>
562- <alias name="subsystemA -dataSource" alias="myApp -dataSource" />
561+ <alias name="myApp -dataSource" alias="subsystemA -dataSource"/>
562+ <alias name="myApp -dataSource" alias="subsystemB -dataSource"/>
563563----
564564
565565Now each component and the main application can refer to the dataSource through a name
@@ -6762,7 +6762,7 @@ annotation accepts a String array for this purpose.
67626762 @Configuration
67636763 public class AppConfig {
67646764
6765- @Bean(name = { "dataSource", "subsystemA-dataSource", "subsystemB-dataSource" })
6765+ @Bean({ "dataSource", "subsystemA-dataSource", "subsystemB-dataSource"})
67666766 public DataSource dataSource() {
67676767 // instantiate, configure and return DataSource bean...
67686768 }
0 commit comments