Total Pageviews

2016/11/05

[Spring Boot] Quick Start

Step 1. Download Eclipse from https://eclipse.org/downloads/

Step 2. Installed Spring Tool Suite (STS) in Eclipse Marketplace, then restart Eclipse


Step 3. Create a Spring Starter Project



Step 4. Fill in project name, group, artifact, package, and so on. Then click Next button.



Step 5. Choose Boot Version and check Web. Then click Next button.



Step 6. Click Finish button.



Step 7. Created demo project.



Step 8. Create a test controller.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
package com.example.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @RequestMapping("/")
    public String sayHello(){
        return "Hello! Spring Boot!";
    }
 
}


Step 9. Start up Spring Boot App






Step 10. Test




No comments: