14 lines
1.3 KiB
Plaintext
Executable File
14 lines
1.3 KiB
Plaintext
Executable File
# OpenInViewAndLazyLoadNoTransTest + OsivDefaultWarningTest + OsivDisabledExceptionTest
|
|
# filtered run output
|
|
|
|
enable_lazy_load_no_trans=true: proxy.getTitle() after close returned 'No-Trans Book' with no exception
|
|
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
|
|
checked at context-startup time: the OSIV warning line is present in the captured log
|
|
default OSIV (true): GET /osiv/books/1 -> status 200, body {"title":"OSIV Default Book","publisher":{"name":"OSIV Default Press","id":1},"id":1,"reviews":[{"comment":"Rendered fine","id":1}]}
|
|
Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Cannot lazily initialize collection of role 'com.ankurm.hibernatedemo.proxy.ProxyBook.reviews' with key '2' (no session)]
|
|
open-in-view=false: GET /osiv/books/2 -> status 500, body {"timestamp":"2026-09-05T17:23:41.574Z","status":500,"error":"Internal Server Error","path":"/osiv/books/2"}
|
|
|
|
Tests run: 1 -- OpenInViewAndLazyLoadNoTransTest (enable_lazy_load_no_trans=true)
|
|
Tests run: 1 -- OsivDefaultWarningTest (open-in-view left unset -> Boot default true)
|
|
Tests run: 1 -- OsivDisabledExceptionTest (open-in-view=false)
|