Skip to content

Delay discovery / load where possible #416

@seancorfield

Description

@seancorfield

Currently addBean() (and similar methods) cause bean discovery which causes loading, which means that FW/1's addBean() call -- to add itself -- happens after the load listener runs, which will be problematic if the load listener tries to load() singletons and a user is letting DI/1 manage their controllers.

It also means that fw is not available as a bean inside the load listener (which is not a big deal unless you're trying to manipulate controllers -- or FW/1 itself -- inside your load listener, which is probably not good practice), which has the side effect of making it harder to debug problems with initialization, since you can't call getBean("fw") to dump configuration information.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions