기록하지 않았다면 잃어버릴 시간들
Home
  • 분류 전체보기 (184)
    • Lang (6)
      • c++ (2)
      • Java (2)
      • python (2)
    • 프레임워크 (18)
      • Spring (16)
      • JPA (2)
    • 알고리즘 (141)
      • 이론 (4)
      • 백준 (59)
      • Codility (13)
      • 프로그래머스 (65)
    • CS (4)
      • 운영체제 (0)
      • 자료구조 (0)
      • DB (4)
      • 네트워크 (0)
      • 보안 (0)
    • 기타 (7)
    • 프로젝트 (4)
      • 게시판 만들기로 배우는 Spring Data JP.. (4)
Home
  • 분류 전체보기 (184)
    • Lang (6)
      • c++ (2)
      • Java (2)
      • python (2)
    • 프레임워크 (18)
      • Spring (16)
      • JPA (2)
    • 알고리즘 (141)
      • 이론 (4)
      • 백준 (59)
      • Codility (13)
      • 프로그래머스 (65)
    • CS (4)
      • 운영체제 (0)
      • 자료구조 (0)
      • DB (4)
      • 네트워크 (0)
      • 보안 (0)
    • 기타 (7)
    • 프로젝트 (4)
      • 게시판 만들기로 배우는 Spring Data JP.. (4)
블로그 내 검색

기록하지 않았다면 잃어버릴 시간들

새로운 것을 배우는게 즐거운 개발자입니다.

  • 프레임워크/Spring

    Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource

    2022. 3. 24.

    by. 내이름은 킹햄찌

    새로운 이전에 사용하던 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' 카테고리의 다른 글

    @RequestParam과 @PathVariable  (0) 2022.05.24
    Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause  (2) 2022.05.22
    Spring Boot 2.3 ver 이상에서 Validation 사용  (0) 2022.02.13
    Execution failed for task ':test'.  (0) 2022.02.01
    aused by: org.hibernate.AnnotationException: No identifier specified for entity:  (0) 2022.01.30

    댓글

    관련글

    • @RequestParam과 @PathVariable 2022.05.24
    • Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause 2022.05.22
    • Spring Boot 2.3 ver 이상에서 Validation 사용 2022.02.13
    • Execution failed for task ':test'. 2022.02.01
    맨 위로
전체 글 보기
Tistory 로그인
Tistory 로그아웃
로그아웃 글쓰기 관리

Today

Total

Powered by ⓒ Kakao Corp.

Designed by Nana
블로그 이미지
내이름은 킹햄찌

티스토리툴바