반응형
JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default.
Therefore, database queries may be performed during view rendering.
Explicitly configure spring.jpa.open-in-view to disable this warning
JPA를 이용하여 간단한 웹앱을 개발하다가 보게 된 WARN 메시지
우선 해당 로그는 OSIV에 대한 내용이다.
OSIV
- Open Session In View : 하이버네이트
- Open EntityManager In View : JPA
JPA 에선 OEIV가 맞지만 관례상 둘 다 OSIV로 부른다.
스프링부트에선 이걸 open-in-view로 통칭했다.
애플리케이션이 시작 될 때 warn 로그를 남기는 것은
스프링 부트에서 open-in-view를 true로 디폴트 설정을 하기 때문이다
오류를 제거하려면
spring.jpa.open-in-view : false
위 내용을 application.properties or application.yml 파일에 적용하면 된다.
그럼 OSIV를 끄고 켜는 것에 의한 변경점에 대해 다음 글에서 다루어 보도록 하겠다.
반응형
'개발자 공부 업무 정보 > DEBUG' 카테고리의 다른 글
TypeError: Class constructor Client cannot be invoked without (1) | 2023.02.20 |
---|---|
Mapped Statements collection does not contain value (0) | 2023.02.16 |
OSIV 2편 (0) | 2022.12.29 |
Column: '컬럼명' in where clause is ambiguous (0) | 2019.01.11 |
java.net.SocketException: Broken pipe (0) | 2019.01.11 |