there is a cycle in the hierarchy json解决方法

there is a cycle in the hierarchy json解决办法异常原因是:在解析bean时,出现死循环调用。解决的办法:过

there is a cycle in the hierarchy json解决办法

异常原因是:在解析bean时,出现死循环调用。

解决的办法:过滤去掉bean中引起死循环调用的属性。

?

JsonConfig jsonConfig = new JsonConfig();jsonConfig.setJsonPropertyFilter(new PropertyFilter() {public boolean apply(Object source, String name, Object value) {if (name.equals("mticketUserinfo")) {return true;}return false;}});
?