• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    해결됨

h2데이터베이스에 대해 질문 있습니다.

21.01.15 08:53 작성 조회수 379

2

서버를 실행할때 data.sql에 있는 쿼리가 실행되는건 왜 그런건가요??

답변 1

답변을 작성해보세요.

5

안녕하세요 케빈님

Spring Boot는 시작될때 root classpath location에 위치한 schema.sql, data.sql 파일의 내용들을 수행하게 되어 있습니다.

참고하시면 좋을만한 링크를 첨부해 드립니다 :)


https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto-initialize-a-database-using-spring-jdbc