inblog logo
|
keepgoing
    SpringBoot

    [Springboot] 1 블로그 프로젝트 세팅

    김호정's avatar
    김호정
    Aug 14, 2024
    [Springboot] 1 블로그 프로젝트 세팅

    프로젝트 설정

    notion image
     
    의존성 추가
    notion image
    세팅으로 이동해서
    notion image
     
    💡
    Tip)
     
    window tab 해서 데스크톱 추가해주고
    다른 데스크톱에서 왔다갔다 할려면
    Ctrl window 방향키 하면 된다.
    다른 데스크톱에 챗지피티, 노션 켜두기
     
    롬복설정
    notion image
    OK 클릭
     

    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'
     
    스프링부트를 사용해서 의존성을 추가하면
     
    1. 내가 들고있는게 아니라 글자를 넣으면 자동으로 다운받을 수 있게 해준다.
    1. A 라이브러리만 다운받으면 A가 의존하는 B 라이브러리도 자동으로 다운받아준다.
     

    임베디드 톰캣

    notion image
    • 스프링은 내장 톰캣이 있어서 톰캣을 따로 다운받지 않아도 이렇게 서버가 돈다.
    • localhost:8080 으로 들어가면 404 에러가 뜬다(아직 페이지가 없기 때문) → 서버가 돌고 있다는 뜻
      • 404 에러 : 페이지를 찾을 수 없음
     
    Share article

    keepgoing

    RSS·Powered by Inblog