【SpringBoot】프로젝트를 만드는 방법(초보자용)
3707 단어 SpringBoot자바
이번에 할 일
환경
Spring Initializr로 프로젝트 원형 만들기





프로젝트를 IntelliJ에서 열기



Hello World 보기
SampleApplication 클래스와 동일한 계층 구조의 디렉토리에서 Controller 클래스를 새로 만듭니다.
HelloController.java
@RestController
public class HelloController {
@GetMapping("/")
public String index() {
return "hello world";
}
@PostMapping("/")
public String index2() {
return "こんにちは";
}
문자가 표시됩니다.

주의점
다중 기동이 되기 때문에 일단 지우고 나서 Run 합시다 「▶」.
@RestController를 붙이자.
Reference
이 문제에 관하여(【SpringBoot】프로젝트를 만드는 방법(초보자용)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/kiyo1219/items/5ed8df8077fa3a15ee6e텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)