첫 페이지 연결 ( Rest )
페이지 정보

본문
package web.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class Index {
@GetMapping("")
public String index() {
return "Hello 하이~";
}
}
01. 콘솔창에서 서버가 리스타트를 하지 않는다면 종료후 Rus as.. > Spring Boot App 실행
02. http://localhost:8080/ : 'Hello 하이~' 출력 확인
- 이전글application.properties ( 데이터베이스 : springboot 생성 및 연결 ) 24.06.03
- 다음글● 첫 프로젝트 생성 및 테스트 24.06.03
댓글목록
등록된 댓글이 없습니다.