0
我有一个ExtJS应用程序,它显示使用REST服务的弹簧引导应用程序的PDF。到目前为止,这工作正常,但是当我从1.3 - > 1.4更新了spring-boot版本时,代码无法正常工作,并显示为空白PDF作为响应。从Spring-Boot应用程序在Sencha ExtJs中打印远程pdf不起作用
这是我的代码:
ExtJS的 - 煎茶
Ext.Ajax.request({
url: MyApp.Application.Globals.baseUrl + url,
params: params,
method: 'POST',
async: false,
headers:{
'Authorization': Utils.getAuthorization()
},
scope : this,
// ON SUCCESS
success: function(response) {
window.open('data:application/pdf,' + escape(response.responseText));
},
// ON FAILURE
failure: function(err) {
console.log(err);
}
});
服务器代码(Spring的引导)
String report = reportService.executeReport(....);
response.setContentType("application/pdf");
try {
response.getWriter().write(report);
} catch (IOException e) {
ELogger.error(this, CoreConstants.LOGGER_CATEGORY, "error creating pdf", e);
}
POM
<spring-boot.version>1.4.4.RELEASE</spring-boot.version> with 1.3.3 it works fine
如果有人能帮助我, 我会很感激。
问候!
最后我发现workaroung,我有修改对象输入反应,现在我有一个 –