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

Fix XML bean reference example in reference manual #33855

Closed
kumaraman528 opened this issue Nov 6, 2024 · 2 comments
Closed

Fix XML bean reference example in reference manual #33855

kumaraman528 opened this issue Nov 6, 2024 · 2 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: documentation A documentation task
Milestone

Comments

@kumaraman528
Copy link

kumaraman528 commented Nov 6, 2024

spring-framework.pdf

Page : 32 (33)

In the equivalent code snippet for idref element property is wrongly set using the value attribute. Instead it should be set using ref attribute.

Context:

<bean id="theTargetBean" class="..."/>
<bean id="theClientBean" class="...">
  <property name="targetName">
    <idref bean="theTargetBean"/>
  </property>
</bean>

Existing code:

<bean id="theTargetBean" class="..." />
<bean id="client" class="...">
    <property name="targetName" value="theTargetBean"/>
</bean>

Proposed Code:

<bean id="theTargetBean" class="..." />
<bean id="client" class="...">
   <property name="targetName" ref="theTargetBean"/>
</bean>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 6, 2024
@sbrannen sbrannen self-assigned this Nov 7, 2024
@sbrannen sbrannen added type: documentation A documentation task in: core Issues in core modules (aop, beans, core, context, expression) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 7, 2024
@sbrannen sbrannen added this to the 6.1.15 milestone Nov 7, 2024
@sbrannen sbrannen changed the title Error in Spring-FrameWork Documentation Fix XML bean reference example in reference manual Nov 7, 2024
@sbrannen
Copy link
Member

sbrannen commented Nov 7, 2024

Hi @kumaraman528,

Good catch, and congratulations on submitting your first GitHub issue ever! 👍

I've fixed the example in 6.1.x and main.

Cheers,

Sam

@kumaraman528
Copy link
Author

Thankyou @sbrannen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

3 participants