티스토리 뷰
이제는 스프링 프로젝트를 만들어 보겠습니다.
Create New Project를 누르시고
Maven을 선택하신 후
프로젝트이름과 위치를 설정하신 후 Finish를 누릅니다.
이후 pom.xml을 세팅해야 합니다
Getting Started
If you are getting started with Spring Boot, or “Spring” in general, start by reading this section. It answers the basic “what?”, “how?” and “why?” questions. It includes an introduction to Spring Boot, along with installation instructions. We then walk yo
docs.spring.io
를 참고하도록 하겠습니다.
사진과 같이 pom.xml을 완성해줍시다.
maven이 설치되지 않으면 에러가 뜰 수도 있는데 IntelliJ에서
이런 알림을 띄워줄겁니다. import Changes를 해줍시다.
이후엔 자바 패키지를 생성하고 파일을 하나만들어준다음 MyApplication에는 @SpringBootApplication annotation을 작성해줍니다. 다음 main method를 아래와 같이 완성해줍시다. package이름과 MyApplication은 원하는 것으로 바꿉시다.
프로그램을 run하게 되면
8080port에서 tomcat이 실행중임을 알 수 있습니다.
하지만 아직 localhost:8080에 들어가면 에러페이지를 띄워줍니다.
ctrl + F2 키를 통해 강제종료할 수 있습니다.
'Web Development > Spring' 카테고리의 다른 글
Spring 핵심원리 (0) | 2021.07.03 |
---|---|
3. Spring Start 02 (0) | 2021.05.11 |
1. Spring Setup 01 (3) | 2020.03.08 |