Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading alias definition example in reference documentation, part 1.3.1 [SPR-17536] #22068

Closed
spring-issuemaster opened this Issue Nov 24, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

spring-issuemaster commented Nov 24, 2018

Amir Pashazadeh opened SPR-17536 and commented

In the later example documentation describes a situation for Subsystem A and SubSystem B, the example must perform the same thing on both, but it does not. I believe its some typo in the example XML, and must become:
 

<alias name="subsystemA-dataSource" alias="myApp-dataSource"/>
<alias name="subsystemB-dataSource" alias="myApp-dataSource" />

Affects: 5.1.2

Reference URL: https://docs.spring.io/spring/docs/5.1.2.RELEASE/spring-framework-reference/core.html#beans-beanname-alias

Referenced from: commits 80b8382, 0761446, 9600e01

Backported to: 5.0.11, 4.3.21

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Nov 25, 2018

Juergen Hoeller commented

It's actually meant to be as follows, aliasing both subsystem references to the main app bean, so that myApp-dataSource is the only bean actually defined in the overall configuration:

<alias name="myApp-dataSource" alias="subsystemA-dataSource"/>
<alias name="myApp-dataSource" alias="subsystemB-dataSource"/>

Thanks for spotting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.