inblog logo
|
하쎄의 기술 일기장
    springboot

    [IntelliJ]에서 [Spring] 적용하기 (1)

    1. 프로젝트 설정
    하세연's avatar
    하세연
    Aug 14, 2024
    [IntelliJ]에서 [Spring]  적용하기 (1)
    Contents
    1. 프로젝트 설정2. Next 버튼을 누르면 다음 화면에서 6가지 파일을 찾는다.3. Create 이후 롬복을 설정하기 위해 settings 로 들어가서 다음과 같은 프로그램을 install한다4. 서버 확인5. 자동 정렬 설정

    1. 프로젝트 설정

    notion image

    2. Next 버튼을 누르면 다음 화면에서 6가지 파일을 찾는다.

    notion image
    다음 체크한 프로그램들은 build.gradle의 dependencies에서 확인할 수 있다.

    build.gradle 라이브러리

    implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-mustache' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
     

    3. Create 이후 롬복을 설정하기 위해 settings 로 들어가서 다음과 같은 프로그램을 install한다

    notion image
    notion image
    OK 버튼 클릭
     

    4. 서버 확인

    • shift + F10 을 눌러 서버를 실행해 보고 해당 그림처럼 Tomcat started on port 8080 이 뜬다면 Tomcat이 내장된 것과 포트 번호를 확인할 수 있다.
    notion image
     
    • localhost:8080 을 검색 후 다음 페이지와 같다면 서버 세팅 완료!
    notion image
    💡
    404 오류는 서버는 돌아가나 페이지를 찾을 수 없다는 오류이다.
     

    5. 자동 정렬 설정

    notion image
    • 해당 셋팅을 체크하면 저장할 때, 자동 정렬된다.
    Share article

    하쎄의 기술 일기장

    RSS·Powered by Inblog