Java

Create First Spring Boot App

Steps to be followed

1.Create Maven project in eclipse /STSĀ 
NEW-Others-Maven Project-
check create sample project 
-give Group ID & Artifact ID

2.Go to POM file and Add Following dependencies
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 <modelVersion>4.0.0</modelVersion>
 <groupId>com.abc.boot</groupId>
 <artifactId>SpringBoot</artifactId>
 <version>0.0.1-SNAPSHOT</version>

<parent>
 <groupId>org.springframework.boot</groupId>
 <artifactId>spring-boot-starter-parent</artifactId>
 <version>1.5.2.RELEASE</version>
</parent>
<dependencies>
<dependency>
 <groupId>org.springframework.boot</groupId>
 <artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>

<properties>
<java.version>1.8</java.version>
</properties>

</project>


3.Create Class To Start Spring Boot App

@SpringBootApplication
public class CourseApiClass {

 public static void main(String[] args) {
 SpringApplication.run(CourseApiClass.class, args);
 }

}


4. Start Application 


Advertisements