严重: Exception Processing ErrorPage[exceptionType=java.lang.Throwable, location=/500.jsp]
java.lang.IllegalStateException
at org.apache.coyote.Response.reset(Response.java:297)
at org.apache.catalina.connector.Response.reset(Response.java:652)
at org.apache.catalina.connector.Response.reset(Response.java:916)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:417)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:271)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
双向关联后转Json,由于两边都关联,会形成死循环,在实体中加注解:
@Entity
@Table(name = "T_DL_URBANDETECTUNIT")
@JsonIgnoreProperties (value = {"urbanRoadInfo"})
/*
@ManyToOne(cascade=CascadeType.ALL)
@JoinColumn(name="URBANID")
public UrbanRoadInfo getUrbanRoadInfo() {
return urbanRoadInfo;
}
public void setUrbanRoadInfo(UrbanRoadInfo urbanRoadInfo) {
this.urbanRoadInfo = urbanRoadInfo;
}
*/
即可使 urbanRoadInfo不参与到json串中