解决方式:

1.可以将报错位置的

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "TypeId")
    public CouponType getType() {
        return type;
    }

修改为

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "TypeId")
    public CouponType getType() {
        return type;
    }

  

posted on 2020-04-02 10:03  510blog  阅读(309)  评论(0编辑  收藏  举报