Top Spring Interview Question & Answer - PowerPoint PPT Presentation

About This Presentation
Title:

Top Spring Interview Question & Answer

Description:

It is a lightweight, loosely coupled and integrated framework for developing enterprise applications in java. – PowerPoint PPT presentation

Number of Views:85
Slides: 11
Provided by: Hub4techh
Tags: html | java | spring

less

Transcript and Presenter's Notes

Title: Top Spring Interview Question & Answer


1
Top Spring Interview Questions and Answers
  • Hub4Tech

2
Question 1 What is Spring?
  • Answer
  • It is a lightweight, loosely coupled and
    integrated framework for developing enterprise
    applications in java.

3
Question 2 What are the advantages of spring
framework?
  • Answer
  • Predefined Templates
  • Loose Coupling
  • Easy to test
  • Lightweight
  • Fast Development
  • Powerful Abstraction
  • Declarative support

4
Question 3 What are the modules of spring
framework?
  • Answer
  • Test
  • Spring Core Container
  • AOP, Aspects and Instrumentation
  • Data Access/Integration
  • Web

5
Question 4 What are the types of Dependency
Injection Spring supports?
  • Answer
  • Setter Injection Setter-based DI is realized by
    calling setter methods on your beans after
    invoking a no-argument constructor or no-argument
    static factory method to instantiate your bean.
  • Constructor Injection Constructor-based DI is
    realized by invoking a constructor with a number
    of arguments, each representing a collaborator.

6
Question 5What is the role of IOC container in
spring?
  • Answer
  • IOC container is responsible to
  • create the instance
  • configure the instance, and
  • assemble the dependencies

7
Question 6 What is BeanFactory?
  • Answer
  • A BeanFactory is like a factory class that
    contains a collection of beans. The BeanFactory
    holds Bean Definitions of multiple beans within
    itself and then instantiates the bean whenever
    asked for by clients.
  • BeanFactory is able to create associations
    between collaborating objects as they are
    instantiated. This removes the burden of
    configuration from bean itself and the beans
    client.
  • BeanFactory also takes part in the life cycle of
    a bean, making calls to custom initialization and
    destruction methods.

8
Question 7What are the types of IOC container
in spring?
  • Answer
  • There are two types of IOC containers in spring
    framework.
  • BeanFactory
  • ApplicationContext

9
Question 8What is the difference between
BeanFactory and ApplicationContext?
  • Answer
  • BeanFactory is the basic container whereas
    ApplicationContext is the advanced container.
    ApplicationContext extends the BeanFactory
    interface. ApplicationContext provides more
    facilities than BeanFactory such as integration
    with spring AOP, message resource handling for
    i18n etc.

10
On demand Training and Talent Assessment Platform
  • Spring Online Free Practice Test
    https//goo.gl/Rtwey5
  • Spring Online Free Interview Question
    https//goo.gl/7M1fwz
  • Spring Online Free Tutorials https//goo.gl/UAHTVw
  • Spring Online Free Quiz https//goo.gl/5rLsov
Write a Comment
User Comments (0)
About PowerShow.com