解决方式:
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; }