Correct way to get beans from applicationContext Spring?

There are many ways to achieve this in spring, the most obvious way given the factory class that you have is to use JavaConfig . If you used the spring enabled JavaConfig annotations you could do the following to construct your beans and add them to the application context.

One way is create a factory class and store the instances of the beans (each implementing a common interface MyBean) as values under some key in a map (beans).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions