Just as a side notes, if you disable
spring.jpa.open-in-view =false
you enforce the session entity detachment, thus it is enable by default and should be disable with caution.
see Baeldung Guide