springMVC后台传list转json到前台失报错

前台:$(document).ready(function(){
$.get("/gh/user/getDoc",function(data){
alert(data.length());
for(var i = 0;i < data.length();i++){
$("#cli_doc").append(""+data[i].nickname+"");
}
});
});

 后台@RequestMapping("getDoc")
    public @ResponseBody List<User> getDoc(){
        List<User> docList = new ArrayList<User>();
        try {
            docList = userService.getDoc();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return docList;
    }

这是报错的情况:警告: Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Could not write content: Infinite recursion (StackOverflowError) (through reference chain: com.register.bean.Role["users"]->org.hibernate.collection.internal.PersistentBag[0]