1) What is Spring Boot?
Spring Boot is a Spring module which provides RAD (Rapid Application Development) feature to Spring framework.
It is used to create stand alone spring based application that you can just run because it needs very little spring configuration.
2) Spring Vs Spring Boot?
Q. What embedded containers are supported by Spring Boot?
Ans:-Spring Boot supports three embedded containers:
- Tomcat (used by default)
- Undertow
- Jetty
Q. What is Thymeleaf in Spring Boot and how to use thymeleaf?
Ans:- It is a Java-based server-side template engine that offers elegant and natural templates for a web application. we can integrate well with Spring Framework and HTML5 Java web applications. To use Thymeleaf, you need to add the following code in the pom.xml file:
1234 <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
1 2 3 4 | <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> |
Q. Can you name and briefly explain all the spring boot components/features?
Advantages of Spring Boot:
- It reduces development and testing time.
- It uses JavaConfig instead of XML.
- It provides an opinionated development approach.
- It offers starter projects or defaults for agile development.
- No separate web server is required; hence there is no need to boot up Glassfish, Tomcat, or any other server.
- It is very easy to develop Spring Based applications with Java or Groovy.
- It reduces lots of development time and increases productivity.
- It avoids writing lots of boilerplate Code, Annotations and XML Configuration.
- It is very easy to integrate Spring Boot Application with its Spring Ecosystem like Spring JDBC, Spring ORM, Spring Data, Spring Security etc.
- It follows “Opinionated Defaults Configuration” Approach to reduce Developer effort
- It provides Embedded HTTP servers like Tomcat, Jetty etc. to develop and test our web applications very easily.
- It provides CLI (Command Line Interface) tool to develop and test Spring Boot(Java or Groovy) Applications from command prompt very easily and quickly.
- It provides lots of plugins to develop and test Spring Boot Applications very easily using Build Tools like Maven and Gradle
- It provides lots of plugins to work with embedded and in-memory Databases very easily.
3. Why we need Spring Boot?
- To ease the Java-based applications Development, Unit Test and Integration Test Process.
- To reduce Development, Unit Test and Integration Test time by providing some defaults.
- To increase Productivity.
What are the features of Spring Boot?
- Web Development
- SpringApplication
- Application events and listeners
- Admin features
No comments:
Post a Comment