-
Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource
2022. 3. 24.
새로운 이전에 사용하던 H2 Database에 연결하여
아래의 코드를 application.properties에 추가해서 해결했고
spring.datasource.initialization-mode=always
추가적으로 아래와 같이 datasource.driver-class 입력시에도 org.h2.Driver 뒤에 키보드 space를 눌러서 공백이 발생하면
Error creating bean with name 'scriptDataSourceInitializer' defined in class path resource 에러가 발생하게 되니 조심
spring.datasource.driver-class-name=org.h2.Driver
참고
https://pravusid.kr/java/2018/10/10/spring-database-initialization.html
Spring에서 JPA / Hibernate 초기화 전략 · ID PRAVUS
Spring-data-JPA와 DBMS를 연결해서 사용할 때 간편히 개발환경의 변경사항을 적용하여 테스트 할 수 있다. 특히 테스트를 위한 in-memory Database인 H2 Database를 염두에 둔 DB 초기화 전략에서 신경쓸 점을
pravusid.kr
https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto.data-initialization
“How-to” Guides
Spring Boot has no mandatory logging dependency, except for the Commons Logging API, which is typically provided by Spring Framework’s spring-jcl module. To use Logback, you need to include it and spring-jcl on the classpath. The recommended way to do th
docs.spring.io
'프레임워크 > Spring' 카테고리의 다른 글
댓글