FirtCommit

This commit is contained in:
kimyonghwa
2019-04-11 17:42:07 +09:00
commit 2b7e6357d9
16 changed files with 502 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
package com.rest.api.controller;
import lombok.Getter;
import lombok.Setter;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class HelloController {
@Setter
@Getter
public static class Hello {
private String message;
}
@GetMapping(value = "/helloworld/string")
@ResponseBody
public String helloworldString() {
return "helloworld";
}
@GetMapping(value = "/helloworld/json")
@ResponseBody
public Hello helloworldJson() {
Hello hello = new Hello();
hello.message = "helloworld";
return hello;
}
@GetMapping(value = "/helloworld/page")
public String helloworld() {
return "helloworld";
}
}