- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 spring boot 2.0.4 构建 REST 接口(interface)。我使用 ExceptionHandler 来处理错误。
问题:
当序列化时引发异常时,jackson 会抛出 JsonMappingException
。我使用默认异常处理程序处理此异常(捕获所有异常)。
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ResponseBody
@ExceptionHandler(Throwable.class)
public String handleThrowable(final Throwable throwable) {
return "SERVER ERROR";
}
现在,当我返回一大堆对象时,我会出现奇怪的行为,并且其中一个由于 RuntimeException 而失败,我没有得到 500
返回。但我收到一个 200
,其中包含第一个序列化对象,然后是错误消息。
示例:
我已经准备了一个完整的问题示例: https://github.com/stefan0001/spring-exception-test/tree/master/src/main/java/test
调用时:
GET http://localhost:8080/test
预期结果:
状态:500
正文:服务器错误
实际结果:
状态:200
正文:
[{"name":"0","throwException":false,"foo":"bar"},{"name":"1","throwException":false,"foo":"bar"},{"name":"2","throwException":false,"foo":"bar"},{"name":"3","throwException":false,"foo":"bar"},{"name":"4","throwException":false,"foo":"bar"},{"name":"5","throwException":false,"foo":"bar"},{"name":"6","throwException":false,"foo":"bar"},{"name":"7","throwException":false,"foo":"bar"},{"name":"8","throwException":false,"foo":"bar"},{"name":"9","throwException":false,"foo":"bar"},{"name":"10","throwException":false,"foo":"bar"},{"name":"11","throwException":false,"foo":"bar"},{"name":"12","throwException":false,"foo":"bar"},{"name":"13","throwException":false,"foo":"bar"},{"name":"14","throwException":false,"foo":"bar"},{"name":"15","throwException":false,"foo":"bar"},{"name":"16","throwException":false,"foo":"bar"},{"name":"17","throwException":false,"foo":"bar"},{"name":"18","throwException":false,"foo":"bar"},{"name":"19","throwException":false,"foo":"bar"},{"name":"20","throwException":false,"foo":"bar"},{"name":"21","throwException":false,"foo":"bar"},{"name":"22","throwException":false,"foo":"bar"},{"name":"23","throwException":false,"foo":"bar"},{"name":"24","throwException":false,"foo":"bar"},{"name":"25","throwException":false,"foo":"bar"},{"name":"26","throwException":false,"foo":"bar"},{"name":"27","throwException":false,"foo":"bar"},{"name":"28","throwException":false,"foo":"bar"},{"name":"29","throwException":false,"foo":"bar"},{"name":"30","throwException":false,"foo":"bar"},{"name":"31","throwException":false,"foo":"bar"},{"name":"32","throwException":false,"foo":"bar"},{"name":"33","throwException":false,"foo":"bar"},{"name":"34","throwException":false,"foo":"bar"},{"name":"35","throwException":false,"foo":"bar"},{"name":"36","throwException":false,"foo":"bar"},{"name":"37","throwException":false,"foo":"bar"},{"name":"38","throwException":false,"foo":"bar"},{"name":"39","throwException":false,"foo":"bar"},{"name":"40","throwException":false,"foo":"bar"},{"name":"41","throwException":false,"foo":"bar"},{"name":"42","throwException":false,"foo":"bar"},{"name":"43","throwException":false,"foo":"bar"},{"name":"44","throwException":false,"foo":"bar"},{"name":"45","throwException":false,"foo":"bar"},{"name":"46","throwException":false,"foo":"bar"},{"name":"47","throwException":false,"foo":"bar"},{"name":"48","throwException":false,"foo":"bar"},{"name":"49","throwException":false,"foo":"bar"},{"name":"50","throwException":false,"foo":"bar"},{"name":"51","throwException":false,"foo":"bar"},{"name":"52","throwException":false,"foo":"bar"},{"name":"53","throwException":false,"foo":"bar"},{"name":"54","throwException":false,"foo":"bar"},{"name":"55","throwException":false,"foo":"bar"},{"name":"56","throwException":false,"foo":"bar"},{"name":"57","throwException":false,"foo":"bar"},{"name":"58","throwException":false,"foo":"bar"},{"name":"59","throwException":false,"foo":"bar"},{"name":"60","throwException":false,"foo":"bar"},{"name":"61","throwException":false,"foo":"bar"},{"name":"62","throwException":false,"foo":"bar"},{"name":"63","throwException":false,"foo":"bar"},{"name":"64","throwException":false,"foo":"bar"},{"name":"65","throwException":false,"foo":"bar"},{"name":"66","throwException":false,"foo":"bar"},{"name":"67","throwException":false,"foo":"bar"},{"name":"68","throwException":false,"foo":"bar"},{"name":"69","throwException":false,"foo":"bar"},{"name":"70","throwException":false,"foo":"bar"},{"name":"71","throwException":false,"foo":"bar"},{"name":"72","throwException":false,"foo":"bar"},{"name":"73","throwException":false,"foo":"bar"},{"name":"74","throwException":false,"foo":"bar"},{"name":"75","throwException":false,"foo":"bar"},{"name":"76","throwException":false,"foo":"bar"},{"name":"77","throwException":false,"foo":"bar"},{"name":"78","throwException":false,"foo":"bar"},{"name":"79","throwException":false,"foo":"bar"},{"name":"80","throwException":false,"foo":"bar"},{"name":"81","throwException":false,"foo":"bar"},{"name":"82","throwException":false,"foo":"bar"},{"name":"83","throwException":false,"foo":"bar"},{"name":"84","throwException":false,"foo":"bar"},{"name":"85","throwException":false,"foo":"bar"},{"name":"86","throwException":false,"foo":"bar"},{"name":"87","throwException":false,"foo":"bar"},{"name":"88","throwException":false,"foo":"bar"},{"name":"89","throwException":false,"foo":"bar"},{"name":"90","throwException":false,"foo":"bar"},{"name":"91","throwException":false,"foo":"bar"},{"name":"92","throwException":false,"foo":"bar"},{"name":"93","throwException":false,"foo":"bar"},{"name":"94","throwException":false,"foo":"bar"},{"name":"95","throwException":false,"foo":"bar"},{"name":"96","throwException":false,"foo":"bar"},{"name":"97","throwException":false,"foo":"bar"},{"name":"98","throwException":false,"foo":"bar"},{"name":"99","throwException":false,"foo":"bar"},{"name":"100","throwException":false,"foo":"bar"},{"name":"101","throwException":false,"foo":"bar"},{"name":"102","throwException":false,"foo":"bar"},{"name":"103","throwException":false,"foo":"bar"},{"name":"104","throwException":false,"foo":"bar"},{"name":"105","throwException":false,"foo":"bar"},{"name":"106","throwException":false,"foo":"bar"},{"name":"107","throwException":false,"foo":"bar"},{"name":"108","throwException":false,"foo":"bar"},{"name":"109","throwException":false,"foo":"bar"},{"name":"110","throwException":false,"foo":"bar"},{"name":"111","throwException":false,"foo":"bar"},{"name":"112","throwException":false,"foo":"bar"},{"name":"113","throwException":false,"foo":"bar"},{"name":"114","throwException":false,"foo":"bar"},{"name":"115","throwException":false,"foo":"bar"},{"name":"116","throwException":false,"foo":"bar"},{"name":"117","throwException":false,"foo":"bar"},{"name":"118","throwException":false,"foo":"bar"},{"name":"119","throwException":false,"foo":"bar"},{"name":"120","throwException":false,"foo":"bar"},{"name":"121","throwException":false,"foo":"bar"},{"name":"122","throwException":false,"foo":"bar"},{"name":"123","throwException":false,"foo":"bar"},{"name":"124","throwException":false,"foo":"bar"},{"name":"125","throwException":false,"foo":"bar"},{"name":"126","throwException":false,"foo":"bar"},{"name":"127","throwException":false,"foo":"bar"},{"name":"128","throwException":false,"foo":"bar"},{"name":"129","throwException":false,"foo":"bar"},{"name":"130","throwException":false,"foo":"bar"},{"name":"131","throwException":false,"foo":"bar"},{"name":"132","throwException":false,"foo":"bar"},{"name":"133","throwException":false,"foo":"bar"},{"name":"134","throwException":false,"foo":"bar"},{"name":"135","throwException":false,"foo":"bar"},{"name":"136","throwException":false,"foo":"bar"},{"name":"137","throwException":false,"foo":"bar"},{"name":"138","throwException":false,"foo":"bar"},{"name":"139","throwException":false,"foo":"bar"},{"name":"140","throwException":false,"foo":"bar"},{"name":"141","throwException":false,"foo":"bar"},{"name":"142","throwException":false,"foo":"bar"},{"name":"143","throwException":false,"foo":"bar"},{"name":"144","throwException":false,"foo":"bar"},{"name":"145","throwException":false,"foo":"bar"},{"name":"146","throwException":false,"foo":"bar"},{"name":"147","throwException":false,"foo":"bar"},{"name":"148","throwException":false,"foo":"bar"},{"name":"149","throwException":false,"foo":"bar"},{"name":"150","throwException":false,"foo":"bar"},{"name":"151","throwException":false,"foo":"bar"},{"name":"152","throwException":false,"foo":"bar"},{"name":"153","throwException":false,"foo":"bar"},{"name":"154","throwException":false,"foo":"bar"},{"name":"155","throwException":false,"foo":"bar"},{"name":"156","throwException":false,"foo":"bar"},{"name":"157","throwException":false,"foo":"bar"},{"name":"158","throwException":false,"foo":"bar"},{"name":"159","throwException":false,"foo":"bar"},{"name":"160","throwException":false,"foo":"bar"},{"name":"161","throwException":false,"foo":"bar"},{"name":"162","throwException":false,"foo":"bar"},{"name":"163","throwException":false,"foo":"bar"},{"name":"164","throwException":false,"foo":"bar"},{"name":"165","throwException":false,"foo":"bar"},{"name":"166","throwException":false,"foo":"bar"},{"name":"167","throwException":false,"foo":"bar"},{"name":"168","throwException":false,"foo":"bar"},{"name":"169","throwException":false,"foo":"bar"},{"name":"170","throwException":false,"foo":"bar"},{"name":"171","throwException":false,"foo":"bar"},{"name":"172","throwException":false,"foo":"bar"},{"name":"173","throwException":false,"foo":"bar"},{"name":"174","throwException":false,"foo":"bar"},{"name":"175","throwException":false,"foo":"bar"},{"name":"176","throwException":false,"foo":"bar"},{"name":"177","throwException":false,"foo":"bar"},{"name":"178","throwException":false,"foo":"bar"},{"name":"179","throwException":false,"foo":"bar"},{"name":"180","throwException":false,"foo":"bar"},{"name":"181","throwException":false,"foo":"bar"},{"name":"182","throwException":false,"foo":"bar"},{"name":"183","throwException":false,"foo":"bar"},{"name":"184","throwException":false,"foo":"bar"},{"name":"185","throwException":false,"foo":"bar"},{"name":"186","throwException":false,"foo":"bar"},{"name":"187","throwException":false,"foo":"bar"},{"name":"188","throwException":false,"foo":"bar"},{"name":"189","throwException":false,"foo":"bar"},{"name":"190","throwException":false,"foo":"bar"},{"name":"191","throwException":false,"foo":"bar"},{"name":"192","throwException":false,"foo":"bar"},{"name":"193","throwException":false,"foo":"bar"},{"name":"194","throwException":false,"foo":"bar"},{"name":"195","throwException":false,"foo":"bar"},{"name":"196","throwException":false,"foo":"bar"},{"name":"197","throwException":false,"foo":"bar"},{"name":"198","throwException":false,"foo":"bar"},{"name":"199","throwException":false,"foo":"bar"},{"name":"200","throwException":false,"foo":"bar"},{"name":"201","throwException":false,"foo":"bar"},{"name":"202","throwException":false,"foo":"bar"},{"name":"203","throwException":false,"foo":"bar"},{"name":"204","throwException":false,"foo":"bar"},{"name":"205","throwException":false,"foo":"bar"},{"name":"206","throwException":false,"foo":"bar"},{"name":"207","throwException":false,"foo":"bar"},{"name":"208","throwException":false,"foo":"bar"},{"name":"209","throwException":false,"foo":"bar"},{"name":"210","throwException":false,"foo":"bar"},{"name":"211","throwException":false,"foo":"bar"},{"name":"212","throwException":false,"foo":"bar"},{"name":"213","throwException":false,"foo":"bar"},{"name":"214","throwException":false,"foo":"bar"},{"name":"215","throwException":false,"foo":"bar"},{"name":"216","throwException":false,"foo":"bar"},{"name":"217","throwException":false,"foo":"bar"},{"name":"218","throwException":false,"foo":"bar"},{"name":"219","throwException":false,"foo":"bar"},{"name":"220","throwException":false,"foo":"bar"},{"name":"221","throwException":false,"foo":"bar"},{"name":"222","throwException":false,"foo":"bar"},{"name":"223","throwException":false,"foo":"bar"},{"name":"224","throwException":false,"foo":"bar"},{"name":"225","throwException":false,"foo":"bar"},{"name":"226","throwException":false,"foo":"bar"},{"name":"227","throwException":false,"foo":"bar"},{"name":"228","throwException":false,"foo":"bar"},{"name":"229","throwException":false,"foo":"bar"},{"name":"230","throwException":false,"foo":"bar"},{"name":"231","throwException":false,"foo":"bar"},{"name":"232","throwException":false,"foo":"bar"},{"name":"233","throwException":false,"foo":"bar"},{"name":"234","throwException":false,"foo":"bar"},{"name":"235","throwException":false,"foo":"bar"},{"name":"236","throwException":false,"foo":"bar"},{"name":"237","throwException":false,"foo":"bar"},{"name":"238","throwException":false,"foo":"bar"},{"name":"239","throwException":false,"foo":"bar"},{"name":"240","throwException":false,"foo":"bar"},{"name":"241","throwException":false,"foo":"bar"},{"name":"242","throwException":false,"foo":"bar"},{"name":"243","throwException":false,"foo":"bar"},{"name":"244","throwException":false,"foo":"bar"},{"name":"245","throwException":false,"foo":"bar"},{"name":"246","throwException":false,"foo":"bar"},{"name":"247","throwException":false,"foo":"bar"},{"name":"248","throwException":false,"foo":"bar"},{"name":"249","throwException":false,"foo":"bar"},{"name":"250","throwException":false,"foo":"bar"},{"name":"251","throwException":false,"foo":"bar"},{"name":"252","throwException":false,"foo":"bar"},{"name":"253","throwException":false,"foo":"bar"},{"name":"254","throwException":false,"foo":"bar"},{"name":"255","throwException":false,"foo":"bar"},{"name":"256","throwException":false,"foo":"bar"},{"name":"257","throwException":false,"foo":"bar"},{"name":"258","throwException":false,"foo":"bar"},{"name":"259","throwException":false,"foo":"bar"},{"name":"260","throwException":false,"foo":"bar"},{"name":"261","throwException":false,"foo":"bar"},{"name":"262","throwException":false,"foo":"bar"},{"name":"263","throwException":false,"foo":"bar"},{"name":"264","throwException":false,"foo":"bar"},{"name":"265","throwException":false,"foo":"bar"},{"name":"266","throwException":false,"foo":"bar"},{"name":"267","throwException":false,"foo":"bar"},{"name":"268","throwException":false,"foo":"bar"},{"name":"269","throwException":false,"foo":"bar"},{"name":"270","throwException":false,"foo":"bar"},{"name":"271","throwException":false,"foo":"bar"},{"name":"272","throwException":false,"foo":"bar"},{"name":"273","throwException":false,"foo":"bar"},{"name":"274","throwException":false,"foo":"bar"},{"name":"275","throwException":false,"foo":"bar"},{"name":"276","throwException":false,"foo":"bar"},{"name":"277","throwException":false,"foo":"bar"},{"name":"278","throwException":false,"foo":"bar"},{"name":"279","throwException":false,"foo":"bar"},{"name":"280","throwException":false,"foo":"bar"},{"name":"281","throwException":false,"foo":"bar"},{"name":"282","throwException":false,"foo":"bar"},{"name":"283","throwException":false,"foo":"bar"},{"name":"284","throwException":false,"foo":"bar"},{"name":"285","throwException":false,"foo":"bar"},{"name":"286","throwException":false,"foo":"bar"},{"name":"287","throwException":false,"foo":"bar"},{"name":"288","throwException":false,"foo":"bar"},{"name":"289","throwException":false,"foo":"bar"},{"name":"290","throwException":false,"foo":"bar"},{"name":"291","throwException":false,"foo":"bar"},{"name":"292","throwException":false,"foo":"bar"},{"name":"293","throwException":false,"foo":"bar"},{"name":"294","throwException":false,"foo":"bar"},{"name":"295","throwException":false,"foo":"bar"},{"name":"296","throwException":false,"foo":"bar"},{"name":"297","throwException":false,"foo":"bar"},{"name":"298","throwException":false,"foo":"bar"},{"name":"299","throwException":false,"foo":"bar"},{"name":"300","throwException":false,"foo":"bar"},{"name":"301","throwException":false,"foo":"bar"},{"name":"302","throwException":false,"foo":"bar"},{"name":"303","throwException":false,"foo":"bar"},{"name":"304","throwException":false,"foo":"bar"},{"name":"305","throwException":false,"foo":"bar"},{"name":"306","throwException":false,"foo":"bar"},{"name":"307","throwException":false,"foo":"bar"},{"name":"308","throwException":false,"foo":"bar"},{"name":"309","throwException":false,"foo":"bar"},{"name":"310","throwException":false,"foo":"bar"},{"name":"311","throwException":false,"foo":"bar"},{"name":"312","throwException":false,"foo":"bar"},{"name":"313","throwException":false,"foo":"bar"},{"name":"314","throwException":false,"foo":"bar"},{"name":"315","throwException":false,"foo":"bar"},{"name":"316","throwException":false,"foo":"bar"},{"name":"317","throwException":false,"foo":"bar"},{"name":"318","throwException":false,"foo":"bar"},{"name":"319","throwException":false,"foo":"bar"},{"name":"320","throwException":false,"foo":"bar"},{"name":"321","throwException":false,"foo":"bar"},{"name":"322","throwException":false,"foo":"bar"},{"name":"323","throwException":false,"foo":"bar"},{"name":"324","throwException":false,"foo":"bar"},{"name":"325","throwException":false,"foo":"bar"},{"name":"326","throwException":false,"foo":"bar"},{"name":"327","throwException":false,"foo":"bar"},{"name":"328","throwException":false,"foo":"bar"},{"name":"329","throwException":false,"foo":"bar"},{"name":"330","throwException":false,"foo":"bar"},{"name":"331","throwException":false,"foo":"bar"},{"name":"332","throwException":false,"foo":"bar"},{"name":"333","throwException":false,"foo":"bar"},{"name":"334","throwException":false,"foo":"bar"},{"name":"335","throwException":false,"foo":"bar"},{"name":"336","throwException":false,"foo":"bar"},{"name":"337","throwException":false,"foo":"bar"},{"name":"338","throwException":false,"foo":"bar"},{"name":"339","throwException":false,"foo":"bar"},{"name":"340","throwException":false,"foo":"bar"},{"name":"341","throwException":false,"foo":"bar"},{"name":"342","throwException":false,"foo":"bar"},{"name":"343","throwException":false,"foo":"bar"},{"name":"344","throwException":false,"foo":"bar"},{"name":"345","throwException":false,"foo":"bar"},{"name":"346","throwException":false,"foo":"bar"},{"name":"347","throwException":false,"foo":"bar"},{"name":"348","throwException":false,"foo":"bar"},{"name":"349","throwException":false,"foo":"bar"},{"name":"350","throwException":false,"foo":"bar"},{"name":"351","throwException":false,"foo":"bar"},{"name":"352","throwException":false,"foo":"bar"},{"name":"353","throwException":false,"foo":"bar"},{"name":"354","throwException":false,"foo":"bar"},{"name":"355","throwException":false,"foo":"bar"},{"name":"356","throwException":false,"foo":"bar"},{"name":"357","throwException":false,"foo":"bar"},{"name":"358","throwException":false,"foo":"bar"},{"name":"359","throwException":false,"foo":"bar"},{"name":"360","throwException":false,"foo":"bar"},{"name":"361","throwException":false,"foo":"bar"},{"name":"362","throwException":false,"foo":"bar"},{"name":"363","throwException":false,"foo":"bar"},{"name":"364","throwException":false,"foo":"bar"},{"name":"365","throwException":false,"foo":"bar"},{"name":"366","throwException":false,"foo":"bar"},{"name":"367","throwException":false,"foo":"bar"},{"name":"368","throwException":false,"foo":"bar"},{"name":"369","throwException":false,"foo":"bar"},{"name":"370","throwException":false,"foo":"bar"},{"name":"371","throwException":false,"foo":"bar"},{"name":"372","throwException":false,"foo":"bar"},{"name":"373","throwException":false,"foo":"bar"},{"name":"374","throwException":false,"foo":"bar"},{"name":"375","throwException":false,"foo":"bar"},{"name":"376","throwException":false,"foo":"bar"},{"name":"377","throwException":false,"foo":"bar"},{"name":"378","throwException":false,"foo":"bar"},{"name":"379","throwException":false,"foo":"bar"},{"name":"380","throwException":false,"foo":"bar"},{"name":"381","throwException":false,"foo":"bar"},{"name":"382","throwException":false,"foo":"bar"},{"name":"383","throwException":false,"foo":"bar"},{"name":"384","throwException":false,"foo":"bar"},{"name":"385","throwException":false,"foo":"bar"},{"name":"386","throwException":false,"foo":"bar"},{"name":"387","throwException":false,"foo":"bar"},{"name":"388","throwException":false,"foo":"bar"},{"name":"389","throwException":false,"foo":"bar"},{"name":"390","throwException":false,"foo":"bar"},{"name":"391","throwException":false,"foo":"bar"},{"name":"392","throwException":false,"foo":"bar"},{"name":"393","throwException":false,"foo":"bar"},{"name":"394","throwException":false,"foo":"bar"},{"name":"395","throwException":false,"foo":"bar"},{"name":"396","throwException":false,"foo":"bar"},{"name":"397","throwException":false,"foo":"bar"},{"name":"398","throwException":false,"foo":"bar"},{"name":"399","throwException":false,"foo":"bar"},{"name":"400","throwException":false,"foo":"bar"},{"name":"401","throwException":false,"foo":"bar"},{"name":"402","throwException":false,"foo":"bar"},{"name":"403","throwException":false,"foo":"bar"},{"name":"404","throwException":false,"foo":"bar"},{"name":"405","throwException":false,"foo":"bar"},{"name":"406","throwException":false,"foo":"bar"},{"name":"407","throwException":false,"foo":"bar"},{"name":"408","throwException":false,"foo":"bar"},{"name":"409","throwException":false,"foo":"bar"},{"name":"410","throwException":false,"foo":"bar"},{"name":"411","throwException":false,"foo":"bar"},{"name":"412","throwException":false,"foo":"bar"},{"name":"413","throwException":false,"foo":"bar"},{"name":"414","throwException":false,"foo":"bar"},{"name":"415","throwException":false,"foo":"bar"},{"name":"416","throwException":false,"foo":"bar"},{"name":"417","throwException":false,"foo":"bar"},{"name":"418","throwException":false,"foo":"bar"},{"name":"419","throwException":false,"foo":"bar"},{"name":"420","throwException":false,"foo":"bar"},{"name":"421","throwException":false,"foo":"bar"},{"name":"422","throwException":false,"foo":"bar"},{"name":"423","throwException":false,"foo":"bar"},{"name":"424","throwException":false,"foo":"bar"},{"name":"425","throwException":false,"foo":"bar"},{"name":"426","throwException":false,"foo":"bar"},{"name":"427","throwException":false,"foo":"bar"},{"name":"428","throwException":false,"foo":"bar"},{"name":"429","throwException":false,"foo":"bar"},{"name":"430","throwException":false,"foo":"bar"},{"name":"431","throwException":false,"foo":"bar"},{"name":"432","throwException":false,"foo":"bar"},{"name":"433","throwException":false,"foo":"bar"},{"name":"434","throwException":false,"foo":"bar"},{"name":"435","throwException":false,"foo":"bar"},{"name":"436","throwException":false,"foo":"bar"},{"name":"437","throwException":false,"foo":"bar"},{"name":"438","throwException":false,"foo":"bar"},{"name":"439","throwException":false,"foo":"bar"},{"name":"440","throwException":false,"foo":"bar"},{"name":"441","throwException":false,"foo":"bar"},{"name":"442","throwException":false,"foo":"bar"},{"name":"443","throwException":false,"foo":"bar"},{"name":"444","throwException":false,"foo":"bar"},{"name":"445","throwException":false,"foo":"bar"},{"name":"446","throwException":false,"foo":"bar"},{"name":"447","throwException":false,"foo":"bar"},{"name":"448","throwException":false,"foo":"bar"},{"name":"449","throwException":false,"foo":"bar"},{"name":"450","throwException":false,"foo":"bar"},{"name":"451","throwException":false,"foo":"bar"},{"name":"452","throwException":false,"foo":"bar"},{"name":"453","throwException":false,"foo":"bar"},{"name":"454","throwException":false,"foo":"bar"},{"name":"455","throwException":false,"foo":"bar"},{"name":"456","throwException":false,"foo":"bar"},{"name":"457","throwException":false,"foo":"bar"},{"name":"458","throwException":false,"foo":"bar"},{"name":"459","throwException":false,"foo":"bar"},{"name":"460","throwException":false,"foo":"bar"},{"name":"461","throwException":false,"foo":"bar"},{"name":"462","throwException":false,"foo":"bar"},{"name":"463","throwException":false,"foo":"bar"},{"name":"464","throwException":false,"foo":"bar"},{"name":"465","throwException":false,"foo":"bar"},{"name":"466","throwException":false,"foo":"bar"},{"name":"467","throwException":false,"foo":"bar"},{"name":"468","throwException":false,"foo":"bar"},{"name":"469","throwException":false,"foo":"bar"},{"name":"470","throwException":false,"foo":"bar"},{"name":"471","throwException":false,"foo":"bar"},{"name":"472","throwException":false,"foo":"bar"},{"name":"473","throwException":false,"foo":"bar"},{"name":"474","throwException":false,"foo":"bar"},{"name":"475","throwException":false,"foo":"bar"},{"name":"476","throwException":false,"foo":"bar"},{"name":"477","throwException":false,"foo":"bar"},{"name":"478","throwException":false,"foo":"bar"},{"name":"479","throwException":false,"foo":"bar"},{"name":"480","throwException":false,"foo":"bar"},{"name":"481","throwException":false,"foo":"bar"},{"name":SERVER ERROR
查看响应正文末尾的SERVER ERROR
。
不知道是bug还是故意的。看起来回复已经写好了或者类似的东西......
引用文献:
最佳答案
一旦提交了 HTTP 响应,就无法更改 HTTP 状态或 header 。此时,该响应可能位于网络缓冲区中,甚至已经发送到客户端。到那时,就没有办法收回了。
因此在这种情况下,Spring 无法更改响应。
从客户端的角度来看,如果响应不完整(例如,其长度反射(reflect)了 Content-Length
header ),then the RFC says the client should close the connection and consider the response incomplete .
关于Spring 异常处理程序返回部分响应 - 也许是错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52834692/
我已经使用 vue-cli 两个星期了,直到今天一切正常。我在本地建立这个项目。 https://drive.google.com/open?id=0BwGw1zyyKjW7S3RYWXRaX24tQ
您好,我正在尝试使用 python 库 pytesseract 从图像中提取文本。请找到代码: from PIL import Image from pytesseract import image_
我的错误 /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference
我已经训练了一个模型,我正在尝试使用 predict函数但它返回以下错误。 Error in contrasts<-(*tmp*, value = contr.funs[1 + isOF[nn]])
根据Microsoft DataConnectors的信息我想通过 this ODBC driver 创建一个从 PowerBi 到 PostgreSQL 的连接器使用直接查询。我重用了 Micros
我已经为 SoundManagement 创建了一个包,其中有一个扩展 MediaPlayer 的类。我希望全局控制这个变量。这是我的代码: package soundmanagement; impo
我在Heroku上部署了一个应用程序。我正在使用免费服务。 我经常收到以下错误消息。 PG::Error: ERROR: out of memory 如果刷新浏览器,就可以了。但是随后,它又随机发生
我正在运行 LAMP 服务器,这个 .htaccess 给我一个 500 错误。其作用是过滤关键字并重定向到相应的域名。 Options +FollowSymLinks RewriteEngine
我有两个驱动器 A 和 B。使用 python 脚本,我在“A”驱动器中创建一些文件,并运行 powerscript,该脚本以 1 秒的间隔将驱动器 A 中的所有文件复制到驱动器 B。 我在 powe
下面的函数一直返回这个错误信息。我认为可能是 double_precision 字段类型导致了这种情况,我尝试使用 CAST,但要么不是这样,要么我没有做对...帮助? 这是错误: ERROR: i
这个问题已经有答案了: Syntax error due to using a reserved word as a table or column name in MySQL (1 个回答) 已关闭
我的数据库有这个小问题。 我创建了一个表“articoli”,其中包含商品的品牌、型号和价格。 每篇文章都由一个 id (ID_ARTICOLO)` 定义,它是一个自动递增字段。 好吧,现在当我尝试插
我是新来的。我目前正在 DeVry 在线学习中级 C++ 编程。我们正在使用 C++ Primer Plus 这本书,到目前为止我一直做得很好。我的老师最近向我们扔了一个曲线球。我目前的任务是这样的:
这个问题在这里已经有了答案: What is an undefined reference/unresolved external symbol error and how do I fix it?
我的网站中有一段代码有问题;此错误仅发生在 Internet Explorer 7 中。 我没有在这里发布我所有的 HTML/CSS 标记,而是发布了网站的一个版本 here . 如您所见,我在列中有
如果尝试在 USB 设备上构建 node.js 应用程序时在我的树莓派上使用 npm 时遇到一些问题。 package.json 看起来像这样: { "name" : "node-todo",
在 Python 中,您有 None单例,在某些情况下表现得很奇怪: >>> a = None >>> type(a) >>> isinstance(a,None) Traceback (most
这是我的 build.gradle (Module:app) 文件: apply plugin: 'com.android.application' android { compileSdkV
我是 android 的新手,我的项目刚才编译和运行正常,但在我尝试实现抽屉导航后,它给了我这个错误 FAILURE: Build failed with an exception. What wen
谁能解释一下?我想我正在做一些非常愚蠢的事情,并且急切地等待着启蒙。 我得到这个输出: phpversion() == 7.2.25-1+0~20191128.32+debian8~1.gbp108
我是一名优秀的程序员,十分优秀!