Basic 1. Spring Tools Suite 설치
3981 단어 spring
1. 여기에서 Eclipse를 install
2. 동작 확인
2.1. 프로젝트 만들기
New -> Project에서 Spring Boot를 열고 Spring Starter Project를 선택합니다.


이름은 Hello
Gradle 3.X
자바 11

Spring Web 검색
Spring Web 선택

Finish
2.2. hello world의 파일에 추가
src/main/java/com/example/hello/HelloApplication.java
src/main/java/com/example/hello/HelloApplication.java@SpringBootApplication
아래에
src/main/java/com/example/hello/HelloApplication.java@RestController
그리고
src/main/java/com/example/hello/HelloApplication.javapublic static void main(String[] args) {
SpringApplication.run(Hello2Application.class, args);
}
아래에
src/main/java/com/example/hello/HelloApplication.java@GetMapping("/hello")
public String hello(@RequestParam(value = "name", defaultValue = "World") String name) {
return String.format("Hello %s!", name);
}
추가합니다.
2.1. 프로젝트 만들기
New -> Project에서 Spring Boot를 열고 Spring Starter Project를 선택합니다.


이름은 Hello
Gradle 3.X
자바 11

Spring Web 검색
Spring Web 선택

Finish
2.2. hello world의 파일에 추가
src/main/java/com/example/hello/HelloApplication.java
src/main/java/com/example/hello/HelloApplication.java
@SpringBootApplication
아래에
src/main/java/com/example/hello/HelloApplication.java
@RestController
그리고
src/main/java/com/example/hello/HelloApplication.java
public static void main(String[] args) {
SpringApplication.run(Hello2Application.class, args);
}
아래에
src/main/java/com/example/hello/HelloApplication.java
@GetMapping("/hello")
public String hello(@RequestParam(value = "name", defaultValue = "World") String name) {
return String.format("Hello %s!", name);
}
추가합니다.
2.3. 브라우저에서 표시
src/main/java/com/example/hello/HelloApplication.java
를 마우스 오른쪽 버튼으로 클릭합니다.Run As
-> Spring Boot App
로서 기동한다.
URL에 브라우저로 액세스
http://localhost:8080/hello

hello world!
가 표시되면 설치가 종료됩니다.
Reference
이 문제에 관하여(Basic 1. Spring Tools Suite 설치), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/kouki_kyo/items/d7bdeaafcb7963a307e7텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)