【发布时间】:2016-08-05 06:08:50
【问题描述】:
我的 odata 托管在后端的 java spring boot 应用程序中。 我正在尝试通过创建 odata 模型从我的 SAP UI5 应用程序的 odata url 访问它,但出现以下错误。
var oModel = new sap.ui.model.odata.ODataModel("'myodataurl'/odata.svc/Users");
Error in console:
OPTIONS "myodataurl"/odata.svc/Users/$metadata 501 (Not Implemented)
XMLHttpRequest cannot load "myodataurl"/odata.svc/Users/$metadata. Response to
preflight request doesn't pass access control check: No 'Access-Control-Allow-
Origin' header is present on the requested resource. Origin 'myurl' is
therefore not allowed access. The response had HTTP status code 501.request.
【问题讨论】:
标签: java spring-mvc odata sapui5