스프링 레이어드 아키텍처 테스트하기

간단한 토이 프로젝트를 레이어드 아키텍처로 구성하여 테스트 코드 작성 해보기

Project settings

Core

Resources Configuration


spring:
  profiles:
    default: local

  datasource:
    url: jdbc:h2:mem:~/cafeKioskApplication
    driver-class-name: org.h2.Driver
    username: sa
    password:

  jpa:
    hibernate:
      ddl-auto: none

---

spring:
  config:
    activate:
      on-profile: local

  jpa:
    hibernate:
      ddl-auto: create
    show-sql: true
    properties:
      hibernate:
        format_sql: true
    defer-datasource-initialization: true # (spring boot 2.5 ~) Hibernate 초기화 이후 data.sql 실행

  h2:
    console:
      enabled: true

---

spring:
  config:
    activate:
      on-profile: test


  jpa:
    hibernate:
      ddl-auto: create
    show-sql: true
    properties:
      hibernate:
        format_sql: true

  sql:
    init:
      mode: never

Structures


Last updated