SpringBoot: Difference between revisions
| Line 1: | Line 1: | ||
==Implementation== | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
@RestController | |||
public class HelloWorldController | |||
{ | |||
// @RequestMapping(method=RequestMethod.GET, path="/hello-world") | |||
@GetMapping(path="/hello-world") | |||
==Examples== | ==Examples== | ||
* [[File:SpringBoot2.PNG|800px]] | * [[File:SpringBoot2.PNG|800px]] | ||
* start eclipse | * start eclipse | ||
* File -> Import -> Maven Project | * File -> Import -> Maven Project | ||
Revision as of 23:46, 6 February 2021
Implementation
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloWorldController
{
// @RequestMapping(method=RequestMethod.GET, path="/hello-world")
@GetMapping(path="/hello-world")