Update documentation after SPR-3542 [SPR-12570] #17171
Labels
status: backported
An issue that has been backported to maintenance branches
type: documentation
A documentation task
Milestone
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 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
The text was updated successfully, but these errors were encountered: