반응형
SMALL
package com.in28minutes.springboot.myfirstwebapp.hello;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class SayHelloController {
//http://localhost:8080/say-hello
@RequestMapping("say-hello")
@ResponseBody
public String sayHello() {
return "Hello! What are you learning today?";
}
@ResposeBody
return "~"; ~를 say-hello에 출력
반응형
LIST
'Spring > Spring Boot' 카테고리의 다른 글
@RequestParam (0) | 2023.09.21 |
---|---|
JSP Login view (0) | 2023.09.20 |
Spring Data JPA (0) | 2023.09.20 |
JPA marge, find, remove (0) | 2023.09.20 |
Spring JDBC 데이터 쿼리 (0) | 2023.09.19 |