java.lang.IllegalStateException: Cannot call sendError() after the response has been committed

我是写了后台接口,用postman调controller中的url出现的错误。解决方法如下:

user实体类设置:

    private int userid;
    private String username;
    private String password;
    private String email;
    private String founder;
    private Timestamp creationtime;
    private String modifiedperson;
    private Timestamp updatetime;
    private short status;
    private String remark;
//    private Collection userRolesByUserid;//去掉这一行

user表和role表通过中间表user_role表关联起来,一对多只需要多的一方维护关系即可,所以,user、role的实体类不需要维护关系,只需要user_role维护关系。

user_role实体类设置:

    private int roleid;
    private int userid;
    private Role roleByRoleid;
    private User userByUserid;

 

你可能感兴趣的:(java)