단 하나의 맥락
: 웹에서 프로젝트 실행
semiflow bundle
- contollrer 만들기
- localhost:8080/~ 실행
- 확인
Contorller | 위치 : src/main/java > "com.mysite.sbb" | |
@Controller | ||
target URL | method와 return되는 것 | |
@RequestMapping | (@Requestbody) |
package com.mysite.sbb;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class HelloController {
@RequestMapping("/hello")
@ResponseBody
public String hello() {
return "Hello World";
}
}
'포트폴리오 > SPRINGBOOT 옛날' 카테고리의 다른 글
2-03 : ORM / JPA / H2-DB / JPA 셋팅 (4) | 2022.09.27 |
---|---|
2-02 : Controller (0) | 2022.09.27 |
2-01 : Structure (0) | 2022.09.25 |
1-05 : Devtools, Lombok (0) | 2022.09.25 |
1-03 : 프로젝트 환경 셋팅 (0) | 2022.09.25 |