If both are possible in Spring, what is the difference between runtime functionality?
Asked
Active
Viewed 115 times
1 Answers
0
The answer is yes, you can wire prototype beans in singleton but there are some pitfalls.
Here is a good example.
https://prasanthnath.wordpress.com/2013/03/21/injecting-a-prototype-bean-into-a-singleton-bean/

Avinash
- 4,115
- 2
- 22
- 41
-
What about the reverse i.e Singleton inside prototype – user18424 Nov 27 '16 at 06:36
-
You can do that as well. The difference between the functionality is – Avinash Nov 27 '16 at 06:40
-
http://stackoverflow.com/questions/16058365/what-is-difference-between-singleton-and-prototype-bean – Avinash Nov 27 '16 at 06:41