Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Write down 10 main difference between Spring and Spring Boot

Answer»

Write down 10 main difference between Spring and Spring Boot
Below are the 10 main difference between Spring and Spring Boot
(1)Spring:-Java EE framework is used by Spring Framework to CREATE applications.
Spring Boot:-Whereas Spring Boot Framework is used to develop REST APIs.

(2)Spring:-It helps devloper to increase productivity as it simplify Java EE development.
Spring Boot:-Its main aim is to shorten the code and help developer to create Web Applications quite easily.

(3)Spring:-Main feature of Spring Framework is dependency injection.
Spring Boot:-Main feature is Autoconfiguration and it automatically configures the classes based on the requirement.

(4)Spring:-It helps to deploy LOOSELY COUPLED applications.
Spring Boot:-It helps to create stand-alone application with very less configuration.

(5)Spring:-The developer writes a lot of code to do the minimal task(boilerplate code).
Spring Boot:-It reduces boilerplate code.

(6)Spring:-If we need to test Spring project we need to setup the server explicitly.
Spring Boot:-Here it will offer embedded server such as jetty and tomcat and many more.

(7)Spring:-It will not support in-memory database.
Spring Boot:-It offers several plugins for working with an embedded and in-memory database such as H2.

(8)Spring:-Developers manually define dependencies for the Spring project in pom.xml
Spring Boot:-Spring Boot comes with concept of starter in pom.xml file that internally takes care of downloading the dependencies JARs based on Requirement.

(9)Spring:-Its a Web application framework which is based on Java.
Spring Boot:-It is a MODULE of spring.

(10)Spring:-Spring is more complex then Spring Boot.
Spring Boot:-It is less complex then the Spring Framework.

2.

Define Spring Framework with details?

Answer»

Define Spring Framework with details?
Spring is a lightweight framework. And it can be treat as framework of FRAMEWORKS because it provides support to various frameworks such as Structs, Tapestry, EJB, Hibernate and JSF etc. It defines structure where we find solution of the various technical problems.
Spring framework comprises of many modules such as core, context, AOP, Aspects, JMS, ORM, OXM, WEB, Servlet, Structs etc. And these modules are grouped into gievn below modules
(1)Test
(2)Spring Core Container
(3)AOP, Aspects and Instrumentation
(4)Data Access/Integration
(5)Web
Below is the disgram which will let you know the modules.


Spring Framework

3.

Write down 4 main components of Spring Boot

Answer»

Write down 4 main COMPONENTS of SPRING Boot
Below are the 4 main components of Spring Boot
(1)Spring Boot Starter
(2)Spring Boot autoconfiguration
(3)Spring Boot Actuator
(4)Spring Boot CLI

4.

Write down 3 Main embedded containers support by Spring

Answer»

Write down 3 Main embedded containers support by Spring
Below are the 3 main embedded containers support by Spring
(1)Tomcat
(2)Jetty
(3)Undertow
By default first one Tomcat is USES as an embedded container.

5.

What is default port of tomcat in spring boot can we change that?

Answer»

What is DEFAULT port of tomcat in spring boot can we change that?
The default port of tomcat in spring boot is given below

8080

and we can change that by ADDING server.port properties in given below files.
(1)By using application.property file
(2)By using application.yml file
(3)By using EmbeddedServletContainerCustomizer INTERFACE
(4)By Command-Line PARAMETER

6.

Basic defination of Spring Framework

Answer»

Basic defination of Spring Framework
Spring is a LIGHTWEIGHT framework developed by Rod Johnson in 2003. It can be say its a framework of frameworks because it SUPPORT to various framworks such as Structs, HIBERNATE, EJB, JSF, Tapestry etc. This framework makes the easy development of JAVAEE application.