Creating “Hello World “Spring Boot Project with STS and Maven Part 1
Link :https://spring.io/toolsand extract it to run
2. Start new Spring Started Project
Enter the name and select the project location, and check if version of java is same as the java version you have installed
3. Explore the Project
4. Creating a new Package
Inside main/java right click to create a new package
5. Under the Newly created package create a new class
And add the following code
1
| package com.example.demo.sts.apiendpoint;
|
1
| import org.springframework.web.bind.annotation.RequestMapping;
|
1
| import org.springframework.web.bind.annotation.RestController;
|
1
| public class DemoSTSEndpoint {
|
Start the Project
Output :
headover to localhost:8080/
Reference