rajmailinfo@gmail.com

Build Spring Boot project

Microservices are built with REST APIs, and the significant reason is that they help in building loosely coupled services. Spring Boot provides the flexibility to create REST APIs quickly, which are exposed as various services.

Spring Boot Framework is quite flexible while working with SQL database. You can use direct JDBC calls using JDBC templates, or you can go by implementing hibernate. One more significant option that Spring framework offers is by creating repositories for Spring Data implementation

Spring Boot provides an option of an embedded in-memory database. This has no persistent data storage. You can retain the data as long as the application is up and running.

Steps to build a simple Spring boot application:

  • Generate a quick Java project with Maven command.
  • Update pom.xml with the Spring web and other Spring boot dependencies.
  • Add SpringApplication.run() method to bootstrap Spring application.
  • Do a Maven clean build using mvn clean package command.
  • Execute command mvn spring-boot:run to run the application.

<dependency>
  <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-data-jpa</artifactid>
</dependency>

<dependency>
  <groupid>org.hsqldb</groupid>
  <artifactid>hsqldb</artifactid>
   <scope>runtime</scope>
</dependency>

Some Technical Question and Answers :

  • Which is the default logging file in springboot? spring.log
  • What is default HTML template engine in spring boot? Thymeleaf
  • What is the Annotation used to handle GET request? @GetMapping
  • What is the Annotation used for Rest controller? @RestController
  • What is the prefix used in HTML for Thymeleaf? th:
  • What is the Minimum Java version need for Spring boot? Java 8
  • Which of the following can be used for Dependency managment in spring boot? Maven & Gradle

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post