개요
HibernateItemWriter를 실행하려는데 아래와 같은 에러가 발생했습니다.
No CurrentSessionContext configured!

해결 방법
아래와 같이 application.properties 혹은 application.yml에 설정을 추가하면 해결됩니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
jpa: | |
properties: | |
hibernate: | |
current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext |
출처
HibernateException: No CurrentSessionContext configured! in spring boot
I have the following configuration: @SpringBootApplication public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); ...
stackoverflow.com
반응형
'[DEV] 기록' 카테고리의 다른 글
사내 개발 스터디 계획 초안 (7) | 2024.01.03 |
---|---|
CORS 개요 (0) | 2023.12.21 |
[Spring Batch] Input resource must exist (reader is in 'strict' mode) (0) | 2023.11.13 |
[Windows + Docker] Socket fail to connect to host:address=(host=localhost)(port= (0) | 2023.11.11 |
[Spring Batch] EL1008E: Property or field 'jobParameters' cannot be found on object of type (0) | 2023.10.27 |