Skip to content

Component scanning fails if a component does not implement a configured default-init-method [SPR-4246] #8924

@spring-projects-issues

Description

@spring-projects-issues

Timothy Braje opened SPR-4246 and commented

If you configure your bean factory to have a default-init-method and then load beans via component scanning, then the bean factory will fail to initialize if beans discovered via component scanning do not define that init method. I have written a small test application that demonstrates this. There is a run.sh file that will run the app,and demonstrate the failure. If the config file spring-config/spring.xml is modified to uncomment the 'hello' bean, then all works just fine.


Affects: 2.5 final

Attachments:

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions