posted 9 years ago
Hello,
I am new to Spring and I have question regarding to the prototype scope of a bean.
I have a simple program, and i have a simple bean called helloworld which has a prototype scope.
Even though its scope defined as prototype; it did not created a new instance each times the bean is called.
I thought it should create a new instance every time it is called.
I was running this program in eclipse.
Here is my simple code. Please help me to point out my errors if you could.
Many thanks in advance.
and the result when i ran the program:
I don't know why its showed the same message twice as it was singleton. I thought it should shown Hello world on the first line and null on the second line.