멍청멍청기록/에러 일기 스프링부트] 초기화 전 data.sql 실행되서 발생되는 에러 - 728x90 반응형 환경 Mac M1 pro // OS Ventura 13.6 Springboot 3.2 java 17 에러 Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Failed to execute SQL script statement #1 of file 원인 및 해결 스프링부트가 첫 실행 시 디렉터리안에 data.sql이 먼저 실행되서 그렇다 application.yml 파일 수정 전 spring: datasource: url: jdbc:h2:tcp://localhost/~/h2testdb username: sa password: driver-class-name: org.h2.Driver h2: console: enabled: true jpa: hibernate: ddl-auto: create-drop properties: hibernate: format_sql: true sql: init: mode: always yml파일에 아래를 추가한다. defer-datasource-initialization: true application.yml 파일 수정 후 spring: datasource: url: jdbc:h2:tcp://localhost/~/h2testdb username: sa password: driver-class-name: org.h2.Driver h2: console: enabled: true jpa: hibernate: ddl-auto: create-drop properties: hibernate: format_sql: true defer-datasource-initialization: true sql: init: mode: always 반응형 공유하기 URL 복사카카오톡 공유페이스북 공유엑스 공유 게시글 관리 구독하기준수한쭈니네 저작자표시 Contents 환경 에러 원인및해결 당신이 좋아할만한 콘텐츠 스프링 시큐리티] 구글 로그인 적용하면서 생긴 문제점 해결 과정 2024.01.13 스프링] Cache miss for REQUEST dispatch to '/' (previous null). Performing MatchableHandlerMapping lookup. This is logged once only at WARN level, and every time at TRACE. 2024.01.13 JPA 에러] JPA 테스트 케이스 에러 2023.08.10 에러] cannot deserialize from Object value (no delegate- or property-based Creator) 해결방법 2023.06.29 댓글 1 + 이전 댓글 더보기