0
RESTサービスを使用しているSpringブートアプリケーションからPDFを表示するExtJSアプリがあります。これまでのところうまくいきましたが、私が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);
}
});
Serverコード(春ブーツ)
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
誰も私を助けることができる場合、 私は感謝するでしょう。
よろしくお願いいたします。
最後に、私は今私は、responeオブジェクトを変更有し、workaroungを発見しました –