Home Programming Kids Programming Hardware & Software Hardware & Networking APP security Software Education Kids Study MCQS Download OTHERS Login

Spring MCQ Questions with Answers

Categories: MCQS

Spring MCQ Questions with Answers

 

Q 1 - Which are the modules of center compartment?

  1. Beans, Center, Setting, SpEL
  2. Center, Setting, ORM, Web
  3. Center, Setting, Viewpoints, Test
  4. Bean, Center, Setting, Test

Answer: A

 

Q 2 - What is singleton scope?

  1.  This degrees the bean definition to a solitary case for every Spring IoC holder.
  2. This degrees the bean definition to a solitary case for every HTTP Solicitation.
  3. This degrees the bean definition to a solitary occurrence for each HTTP Meeting.
  4. This extensions the bean definition to a solitary case for each HTTP Application/Worldwide meeting.

Answer: A

 

Q 3 - What is demand scope?

  1.  This degrees a bean definition to a HTTP demand.
  2.  This degrees the bean definition to Spring IoC compartment.
  3.  This extensions the bean definition to HTTP Meeting.
  4.  This extensions the bean definition HTTP Application/Worldwide meeting.

Answer: A

 

Q 4 - What is autodetect method of autowiring?

  1. Like byType, however type applies to constructor contentions. On the off chance that there isn't precisely one bean of the constructor contention type in the holder, a lethal mistake is raised.
  2. Autowiring by property name. Spring attempts to coordinate and wire its properties with the beans characterized by similar names in the design document.
  3. Spring first attempts to wire utilizing autowire by constructor, in the event that it doesn't work, Spring attempts to autowire by byType.
  4. Autowiring by way of property kind. Spring attempts to coordinate and wire a property in the event that its sort coordinates with precisely one of the beans name in setup record.

Answer C

 

Q 5 - What is ContextStartedEvent occasion?

  1. This occasion is distributed when the Servlet Setting is either introduced or revived.
  2. This occasion is distributed when the HTTP Solicitation is gotten.
  3. This occasion is distributed when the ApplicationContext is begun utilizing the beginning () strategy on the ConfigurableApplicationContext interface.
  4. This occasion is distributed when the HTTP Reaction is returned.

Answer: C

 

Q 6 - What is the default extent of the beans?

  1. Model
  2. Meeting
  3. Demand
  4. Singleton

Answer: Singleton

 

Q 7 - ClassPathXmlApplicationContext look .xml record in:

  1. Explicit area inside filesystem
  2. Anyplace in project way (counting container record)
  3. Anyplace in classpath (counting container document)
  4. In web_inf organizer

Answer: c

 

Q 8 - How bean life cycle can be controlled?

  1. Utilizing init() as it were
  2. Utilizing InitializingBean class as it were
  3. Utilizing DisposableBean class as it were
  4. Utilizing All of above

Answer: D

 

Q 9 - In the event that a bean is checked to HTTP demand, extension is

  1. Meeting
  2. Worldwide meeting
  3. Model
  4. Demand

Answer: D

Spring MCQ Questions with Answers