Wednesday, April 29, 2020

How to create Spring Boot project in Spring-tool-Suite (STS) Step-By-Step

Create Spring Boot project in Spring-tool-Suite (STS)

There are two ways to create Spring Boot project either by using https://start.spring.io or IDE. So, Let's begin.
  1. Create Spring Boot project using spring tool suite or you can use https://start.spring.io:
  2. Goto File -> New -> Spring Starter Project
    Create New Spring Boot project using Spring Tool Suite
  3. Provide necessary details in https://start.spring.io or IDE such as name, type, Packaging, Java Version, Language, etc. For example:
    No Caption
    Details for creating project using STS

             
    Add Dependencies in start.spring.io and generate project
       
  4. Select Spring Boot Version, and select the dependencies required for your project. I am taking the following dependency in my project:
    • Rest Repository - Exposing Spring Data repositories over REST via Spring Data REST.
    • Spring Data JPA - Persist data in SQL stores with Java Persistence API using Spring Data and Hibernate.
    • MySQL Driver - MySQL JDBC driver.
    • Spring Boot DevTools - Provides fast application restarts, LiveReload, and configurations for enhanced development experience.
    • Spring Web Starter - Build web, including RESTful, applications using Spring MVC.
  5. Click on finish in IDE. If you are creating project start.spring.io then, generate the project as zip, extract it and import in IDE.
  6. After successful create/import project, structure will look like:
    Structure after project creation
    Enjoy learning. :)

No comments:

Post a Comment