2015-12-15 26 views
0
@RequestMapping(value = "/v1/locate/latlng/{lat:.+},{lng:.+}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")  
public ApiResultModel<LocateModel> getLocate(@PathVariable("lat") Double lat, @PathVariable("lng") Double lng)  

內容處置(。):附件;文件名= f.txtSpring4.2.2 @Pathvariable與點我想返回JSON,但返回f.txt

+0

上面的更新/格式並詢問明確的問題。 – Raf

+0

例如:v1/locate/latlng/39.995668,116.480255 – LongJames

+0

http://stackoverflow.com/a/34184392/5628401 – LongJames

回答

0

升級是解決方案,與Spring框架4.2 .3

+1

Still Content-Disposition:attachment; filename = f。 txt與Spring Framework 4.1.8(使用Spring IO Platfrom 1.1.4時),但肯定是Content-Disposition:inline; filename = f.txt當使用Spring IO Platform 2.0.0(使用Spring Framework 4.2.3) – LongJames