[Spring batch] ERROR: relation "batch_job_instance" does not exist

2025. 3. 17. 18:02·트러블슈팅

이전 버전에서는 application.yml에 해당 옵션을 설정해주면 자동으로 관련 테이블이 생성된다.

spring.batch.initialize-schema=always

 

다만, 최신 버전에서는 위 옵션이 활성화가 되어있지 않아서 자동으로 script가 실행이 되지 않는다. 

spring:
  sql:
    init:
      platform: postgres
      schema-locations: classpath:org/springframework/batch/core/schema-postgresql.sql
      mode: always # always로 해준 뒤 embedded로 변경

 

 

따라서 위와 같이 직접 sql 파일 경로를 찾아 init 해준다.

'트러블슈팅' 카테고리의 다른 글
  • Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  • [JAVA] Swagger에서 파라미터 숨기기(커스텀 어노테이션 @CurrentUser)
  • [Spring Security]OAuth2UserService 로직 실행되지 않는 문제(OAuth2 로그인: Google OpenID Connect 트러블슈팅)
  • userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth] (OpenSSH ssh-rsa deprecated)
minseok__
minseok__
  • minseok__
    minseok_study
    minseok__
  • 전체
    오늘
    어제
    • 분류 전체보기 (91)
      • JAVA (1)
      • Kotlin (0)
      • CS (1)
      • SQL (7)
      • Python (2)
      • Docker (13)
      • Typescript (0)
      • Javascript (1)
      • AWS (6)
      • NestJS (1)
      • ElasticSearch (1)
      • 트러블슈팅 (10)
      • DB (6)
      • 알고리즘 (5)
      • Redis (1)
      • Postgresql (1)
      • AI (0)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    response data
    k8s
    반환 데이터
    useswrinfinite
    SQL
    amazon linux 2023
    createMany
    빅쿼리
    윈도우
    외래키 참조
    openssh 8.8
    EC2
    userauth_pubkey: key type ssh-rsa not in pubkeyacceptedalgorithms
    docker
    node.js 20
    쿠버네티스
    bigquery
    window
    error: relation "batch_job_instance" does not exist
    mysql 아키텍처
  • 최근 댓글

  • hELLO· Designed By정상우.v4.10.3
minseok__
[Spring batch] ERROR: relation "batch_job_instance" does not exist
상단으로

티스토리툴바