解决springdatajpa懒加载问题

在配置文件里面就是yml或者properties结尾的文件里加上这一句
jpa:
properties:
hibernate:
enable_lazy_load_no_trans: true
这是yml的配置文件,如果是properties可以使用点代替:

博客网站 https://yamon.top 个人网站 https://yamon.top/resume GitHub网站 https://github.com/yamonc 欢迎前来访问
原文地址:https://www.cnblogs.com/chenyameng/p/12589819.html