|
Indeed, inner beans inherit the scope from their containing beans. I'll check whether that actually still works in the 2.1 codebase (if you have a specific test case around, please attach it!). I guess we should also consider validating inner bean definitions more aggressively, rejecting scopes that do not match the parent's. Juergen There are actually two issues here - inner beans do not inherit their parent's scope, and inner beans cannot be scoped explicitly (as per the issue description). I would like to see both fixed if that's possible. Shall we open another issue? Inner beans can now be scoped explicitly. Also, when no scope is provided for an inner-bean it will inherit the containing bean's scope by default (even for 'custom' scopes). Both of the attached test-cases pass. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Reading
SPR-2744it seems like the expected behaviour is to inherit scope from a parent bean - that makes sense to me, but it doesn't happen in practice. So maybe this is a regression?