Easy way to learn Spring boot: Introduction Part
Step: 1 Introduction Part
What is Spring Boot?
Spring Boot is a most popular Spring Framework that help us to create RAD (Rapid Application Development) in a easier and faster way. Using Spring Boot framework we can create and run both simple and web-based applications.
Spring Boot is the combination of Spring Framework and Embedded Servers(Tomcat). Now a day we don't need to configure XML file too much. Using annotations we can perform every thing very easily. However, XML is used for configuring Spring's dependencies and so on.
Why Should we use Spring Boot?
- Spring Boot is a Spring Framework with Embedded Servers.
- It provides an easier and faster way to set up, configure, and run both simple and web-based applications.
- The dependency injection approach is used in Spring Boot.
- It contains powerful database transaction management capabilities using Java frameworks like JPA/Hibernate ORM.
- It is a security framework that provides robust security to applications like Spring security.
- It creates stand-alone Spring applications that can be started using Java -jar.
- It provides opinionated 'starter' POMs to simplify our Maven configuration.
Spring Boot Architecture:
This is the basic flow diagram of Spring boot where three layers are present.
Model: Here we create the Entity class. Entities in JPA are nothing but POJOs representing data that can be persisted to the database. An entity represents a table stored in a database. Every instance of an entity represents a row in the table. Using @Entity we can create.
Repository Class: Its an interface that extends the JpaRepository<> for performing the CRUD operation.
Service: Its a normal DTO class where we can implement all the function that are defined in the Repository class and also implements our costume method.
Controller: A Controller class, which is capable of serving REST API requests and corrosponding Responses. This class must be annotated with @RestController annotation.
Using this approaches we can easily create a spring boot application.
Great bro keep it up
ReplyDeleteGreat work
ReplyDelete