为了账号安全,请及时绑定邮箱和手机立即绑定

没有为org.hibernate.proxy.pojo.javassist.Javassist

没有为org.hibernate.proxy.pojo.javassist.Javassist

慕虎7371278 2019-11-12 12:56:22
我正在处理SpringMVC,Hibernate&,JSON但出现此错误。HTTP Status 500 - Could not write JSON: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.SerializationFeature.FAIL_ON_EMPTY_BEANS) ) 请在下面检查我的实体    @Entity@Table(name="USERS")public class User {    @Id    @GeneratedValue    @Column(name="USER_ID")    private Integer userId;    @Column(name="USER_FIRST_NAME")    private String firstName;    @Column(name="USER_LAST_NAME")    private String lastName;    @Column(name="USER_MIDDLE_NAME")    private String middleName;    @Column(name="USER_EMAIL_ID")    private String emailId;    @Column(name="USER_PHONE_NO")    private Integer phoneNo;    @Column(name="USER_PASSWORD")    private String password;    @Column(name="USER_CONF_PASSWORD")    private String  confPassword;    @Transient    private String token;    @Column(name="USER_CREATED_ON")    private Date createdOn;    @OneToMany(fetch=FetchType.EAGER,cascade=CascadeType.ALL)    @Fetch(value = FetchMode.SUBSELECT)    @JoinTable(name = "USER_ROLES", joinColumns = { @JoinColumn(name = "USER_ID") }, inverseJoinColumns = { @JoinColumn(name = "ROLE_ID") })    private List<ActifioRoles> userRole = new ArrayList<ActifioRoles>();    @OneToMany(fetch=FetchType.EAGER,cascade=CascadeType.ALL,mappedBy="userDetails")    @Fetch(value = FetchMode.SUBSELECT)    private List<com.actifio.domain.Address> userAddress = new ArrayList<com.actifio.domain.Address>();    @OneToOne(cascade=CascadeType.ALL)    private Tenant tenantDetails;    public Integer getUserId() {        return userId;    }    public void setUserId(Integer userId) {        this.userId = userId;    }    public String getFirstName() {        return firstName;    }    public void setFirstName(String firstName) {        this.firstName = firstName;    }    public String getLastName() {        return lastName;    }我该如何解决?
查看完整描述

3 回答

  • 3 回答
  • 0 关注
  • 427 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信