Skip to content

data.sql 초기 데이터 입력 시 이슈 #14

@SeokRae

Description

@SeokRae

스프링 부트 버전이 2.5 이상부터 data.sql 적용하는 방법이 변경되어
properties 설정 추가
https://springhow.com/spring-boot-version/

spring.jpa.defer-datasource-initialization=true

현재 프로퍼티 설정 정보

spring:
  jpa:
    generate-ddl: true
    show-sql: true
    open-in-view: false
    defer-datasource-initialization: true
    database-platform: org.hibernate.dialect.H2Dialect

    properties:
      hibernate:
        format_sql: true

    hibernate:
      ddl-auto: create-drop

  datasource:
    hikari:
      driver-class-name: org.h2.Driver
      jdbc-url: jdbc:h2:mem:testdb
      username: sa
      password:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions