How Will You Define the Scope of a Bean in Spring ?

In configuration xml, we can specify the scope of bean in its definition. This is used by container to decide the scope of bean in Spring.

E.g.

This is an example of userService bean with prototype scope.



You May Interest

Why Did Oracle Release a New Version of Java Like Java 8 ?

Comparing HashSet and TreeSet Collections in Java

How Stack and Heap Work in Java Multi-threading Environment ?

What is the Difference Between init-param and context-param in JS ...

How Will You Implement a Thread Safe JSP Page ?