saralor
saralor

Reputation: 61

If BeanFactory holds bean definitions, which class holds actual bean instances?

It's stated in BeanFactory's doc, that it

is implemented by objects that hold a number of bean definitions

If BeanFactory, or ApplicationContext (that is also a BeanFactory) hold bean definition, what class is responsible of holding actual beans?

It's said also that BeanFactory is

The root interface for accessing a Spring bean container

What class is this container?

Upvotes: 1

Views: 31

Answers (1)

Kayaman
Kayaman

Reputation: 73558

It shouldn't really matter as it's an implementation detail, unless you intend to work with the internal classes. But for example singleton beans are by default contained in a map in DefaultSingletonBeanRegistry etc.

The container isn't a single class, it refers to spring as a whole.

Upvotes: 1

Related Questions