[Java/Spring] Spring Boot
이 게시물은 naver boostcourse와 패스트캠퍼스의 강의를 시청한 후 정리한 글입니다.
Build Tool
- Maven
- Gradle
Survlet Containers
- Tomcat
- Jetty
- Undertow
- Netty
- 어플리케이션 개발에 필수 요소만 모아둠
- 기존 Spring보다 간단하게 설정가능, 간단한 어플리케이션 개발 가능
- 간단하고, 빠르게 어플리케이션을 실행 및 배포가 가능하다.
- Spring에서 불편한 설정이 없어졌다.
1. Intelli J 설치
(http://jetbrains.com/idea/download/#section=windows)
Download IntelliJ IDEA: The Capable & Ergonomic Java IDE by JetBrains
Download the latest version of IntelliJ IDEA for Windows, macOS or Linux.
www.jetbrains.com
Download IntelliJ IDEA -> Community-> Download
2. JAVA JDK 설치
(http://oracle.com/kr/java/technologies/javase-download.html)
JDK Download -> 환경에 맞게 설치 (Windows x 64 installer를 설치함)
3. REST API설치
Talend API Tester - Free Edition
Visually interact with REST, SOAP and HTTP APIs.
chrome.google.com
chrome에 추가 --> 확장 프로그램 --> Talend API Tester - Free Edition 클릭 -> Use Talend API Tester -Free EDition
위와 같은 화면에서 GET method로 주소를 붙여넣을시 응답을 관찰 할 수 있다.
- header, char set등등을 볼 수 있다.
- 여기서 html데이터를 오른쪽 부분body에서 관찰 할 수 있다. (원본)
POST metod로 지정하면 header를 추가할 수 있고, body에다 json을 작성하여 만들 수 있다.
3. Community Intelli J에서 스트링 부트 시작하기
참고 : (http://engkimbs.tistory.com/78)
Project -> new Project -> Maven -> 그룹명, 아티팩트명 설정 -> 프로젝트명 설정
위의 화면에서 다음과 같이 입력한다.
[Spring boot] #1 프로젝트 시작하기 (Gradle)
[Spring boot] #1 프로젝트 시작하기 (Gradle) Spring boot를 사용해 웹 프로젝트를 만들어보자. 일단 기본적인 프로젝트를 만들고 이 후 계속적으로 하나하나 필요한 부분을 붙혀가는 형태로 포스팅을 진
gyrfalcon.tistory.com
New -> Project -> Gradle -> Java클릭 -> 프로젝트 명을 입력하여 새로 만듬
gradle에 들어가보면 다음과 같이 코드가 보인다.