0
我有我的odata,它是從後端的java spring引導應用程序託管的。 我試圖通過創建odata模型從我的SAP UI5應用程序odata url訪問它,我得到以下錯誤。無法訪問sap ui5中的odata
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.