Bean Scopes in Java Spring

0 votes

How many bean scopes does Spring Framework support?

Jul 3, 2018 in Java by misc.edu04
• 1,430 points
109 views

1 answer to this question.

0 votes

According to my knowledge, the Spring Framework supports five scopes. They are:

  • Singleton: This provides scope for the bean definition to a single instance per Spring IoC container.
  • Prototype: This provides scope for a single bean definition to have any number of object instances.
  • Request: This provides scope for a bean definition to an HTTP-request. 
  • Session: This provides scope for a bean definition to an HTTP-session. 
  • Global-session: This provides scope for a bean definition to a Global HTTP-session. 
answered Jul 3, 2018 by geek.erkami
• 2,640 points

Related Questions In Java

0 votes
1 answer

@RequestMapping annotation in Java Spring

The @RequestMapping annotation in Spring Framework is ...READ MORE

answered Sep 11, 2018 in Java by code.reaper12
• 3,450 points
274 views
+5 votes
3 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,380 points

edited Nov 6, 2018 by Omkar 11,286 views
+1 vote
3 answers

What is the syntax to declare and initialize an array in java?

You can use this method: String[] strs = ...READ MORE

answered Jul 25, 2018 in Java by samarth295
• 2,190 points
704 views
0 votes
2 answers

How can I convert a String variable to a primitive int in Java

 Here are two ways illustrating this: Integer x ...READ MORE

answered Aug 20 in Java by Sirajul
• 40,990 points
209 views
0 votes
1 answer
0 votes
1 answer

Bean life cycle in Spring Bean Factory Container

Bean life cycle in Spring Bean Factory ...READ MORE

answered Aug 29, 2018 in Java by code.reaper12
• 3,450 points
592 views
0 votes
1 answer

DTO vs VO vs POJO vs JavaBeans

Data Transfer Object is used for transferring a collection ...READ MORE

answered Aug 14, 2018 in Java by code.reaper12
• 3,450 points
3,230 views
0 votes
2 answers

How can I get the filenames of all files in a folder which may or may not contain duplicates

List<String> results = new ArrayList<String>(); File[] files = ...READ MORE

answered Sep 12, 2018 in Java by Sushmita
• 6,880 points
627 views
0 votes
1 answer

Sorting an ArrayList in Java

You can easily do this by simply ...READ MORE

answered May 4, 2018 in Java by geek.erkami
• 2,640 points
240 views
0 votes
1 answer

Why the main() method in Java is always static?

As you might know, static here is ...READ MORE

answered May 8, 2018 in Java by geek.erkami
• 2,640 points
450 views