Wednesday, May 23, 2018

Setting up Spring Boot

Setting up Spring Boot

Best way to set up a spring boot application is by Spring Intializr,Where you can add all the dependencies required ,download  and import it in IDE.
OR
Create a new maven or gradle project and all the dependencies manually.
OR
Start a spring starter project from spring tools suite IDE

To start an application,just run Generated MainApplication.java file which starts the embedded server.

import org.springframework.boot.SpringApplication;
@SpringBootApplication
public class MainApplication {
 public static void main(String[] args) {
  
  SpringApplication.run(MainApplication.class, args); 
 }
  
}

Just run the MainApplication.java as classic java application, Once the server is up,you can request for resources.
Let's create some resources in coming chapters.
Share:

0 comments:

Post a Comment