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-projects-issues opened this issue Nov 24, 2018 · 1 comment
Assignees
Labels
status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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-projects-issues
Copy link
Collaborator Author

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!

@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches type: documentation A documentation task labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.1.3 milestone Jan 11, 2019
This was referenced Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

2 participants