现象: 1.报错:There is a cycle in the hierarchy! 2.返回至前台的json不完整,字段丢失. 错误原因: eg:entity1的属性有list<entitiy2>,entity2的字段中也含有entity1,即常见的双向关联;引发的死循环 解决方案: 1.重写一个vo用于传输json 2.@JsonIgnore
报错: HTTP Status 500 - Could not write content: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_E
在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again”,网上一般说需要配置maxInMemorySize,自己测试发现,maxInMemorySize确实会影响结果,并且项目还跟写入文件到文件夹的transferTo(File dest)方法也有关系,以下是报错截图: 问题说明 通过debug和浏览器提示,浏览器端代码没有问题,问题跟服务端专门处理上
2008-12-13 15:06:03,930 WARN (DefaultHandlerExceptionResolver.java:384)- Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public com.mydemo.Result com.daxue.controller.
发送post请求到controller处理失败,报错日志如下: java.lang.IllegalStateException: getInputStream() has already been called for this request at org.apache.catalina.connector.Request.getReader(Request.java:1212) at org.apache.catalina.connector.RequestFacade.getReader(
今天做了个导出excel表的功能.大概代码如下: ouputStream = response.getOutputStream(); wb.write(ouputStream); ouputStream.flush(); ouputStream.close(); 1234发现报错 java.lang.IllegalStateException: getOutputStream() has already been called for this response1报错原因getOutputStr
服务端代码 control类 @RequestMapping(value="getUser",method = RequestMethod.POST) @ResponseBody public User getUser(HttpServletRequest request){ String name = request.getParameter("name"); String age = request.getParameter("age");