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

Update documentation after SPR-3542 [SPR-12570] #17171

Closed
spring-projects-issues opened this issue Dec 25, 2014 · 0 comments
Closed

Update documentation after SPR-3542 [SPR-12570] #17171

spring-projects-issues opened this issue Dec 25, 2014 · 0 comments
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

spring-projects-issues commented Dec 25, 2014

Qadeer Ahmad opened SPR-12570 and commented

In #8225, changes were made in bean inheritance regarding scope. However, the documentation about this particular bit remains unchanged:

http://docs.spring.io/spring/docs/4.1.x/spring-framework-reference/html/beans.html#beans-child-bean-definitions

...
The remaining settings are always taken from the child definition: depends on, autowire mode, dependency check, singleton, scope, lazy init.

The same text is found in the version prior to this change: http://docs.spring.io/spring/docs/2.5.x/reference/beans.html#beans-child-bean-definitions

With the changes in #8225, the scope property is inherited from the parent bean definition if not defined in the child. The scope property is not always taken from the child property. In my opinion this part of the documentation should be updated to explicitly describe when the scope property is inherited.

Background: I was working with a some legacy system where I updated Spring from version 2.5.x to 3.2.x. After the upgrade, many tests started to fail due to this change. After some debugging I found that the scope was not the same anymore, but I could not understand why because the documentation was the same about this part. Fortunately, I found the Jira issue and the changelog, and understood that the bean definition inheritance had actually changed.

I think the update in documentation can help others in the similar situation.


Issue Links:

Backported to: 4.0.9, 3.2.13

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