inblog logo
|
LHS's Study Space
    스프링부트

    [스프링 부트] 29. 게시판 v5 프로젝트 생성

    lhs's avatar
    lhs
    Dec 01, 2024
    [스프링 부트] 29. 게시판 v5 프로젝트 생성
    Contents
    1. 의존성 설정2. application.properties3. build.gradle4. 기본 파일들
     

    1. 의존성 설정

    notion image
    • 프로젝트에 필요한 라이브러리 의존성을 설정한다.

    2. application.properties

    # 0. UTF-8 설정 server.servlet.encoding.charset=utf-8 server.servlet.encoding.force=true # 1. h2 DB 연결 spring.datasource.driver-class-name=org.h2.Driver spring.datasource.url=jdbc:h2:mem:test spring.datasource.username=sa # 2. 하이버네이트 spring.jpa.hibernate.ddl-auto=create spring.jpa.show-sql=true # 3. 더미데이터 생성 classpath >> resources 경로 spring.sql.init.data-locations=classpath:db/data.sql spring.jpa.defer-datasource-initialization=true
    • 프로젝트에서 필요한 각각의 설정을 한다.

    3. build.gradle

    // implementation 'org.springframework.boot:spring-boot-starter-security' // testImplementation 'org.springframework.security:spring-security-test'
    • 현재 쓰지 않는 라이브러리를 주석으로 처리한다.

    4. 기본 파일들

    notion image
    • 프로젝트에 필요한 기본 파일들을 생성하고 의존성을 주입한다.
    Share article
    Contents
    1. 의존성 설정2. application.properties3. build.gradle4. 기본 파일들

    LHS's Study Space

    RSS·Powered by Inblog