找不到sap-ui-version.json 404

2020-09-07 08:21发布

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


蚀痕:2018-12

ui5版本:1.65.1

apache olingo v4

遵循本教程:

https://olingo.apache.org/doc/odata4/ tutorials/read/tutorial_read.html

通过邮递员获得正确答案

我想使用ui5表显示数据

index.html:

<!DOCTYPE HTML>

<脚本

src=" resources/sap-ui-core.js"

id =" sap-ui-bootstrap"

data-sap-ui-libs =" sap.m"

data-sap-ui-xx-bindingSyntax =" complex"

data-sap-ui-theme =" sap_bluecrystal">

<!-仅加载移动库" sap.m"和" sap_bluecrystal"主题->

view1.view.xml:

http://www.w3.org/1999/xhtml">

<页面标题="标题">

view1.controller.js:

sap.ui.controller(" Odata.view1",{onBeforeRendering:function(){

var uri =" ../DemoOdata4Service/DemoService.svc";

var oModel = new sap.ui.model.json.JSONModel(uri);

this.getView()。setModel(oModel);

var oTemplate = new sap.m.ColumnListItem({

个单元格:[

new sap.m.Text({文本:" {ID}"}),

new sap.m.Text({text:" {Name}"}),

new sap.m.Text({text:" {Description}"})]});

this.getView()。byId(" _ table1")。bindAggregation(" items",{//路径:"/img/PurchaseOrders",路径:"/img/Products",模板:oTemplate});

}

})

web.xml:

<?xml version =" 1.0" encoding =" UTF-8"?>

http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation =" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ ns/javaee/web-app_2_5.xsd " version =" 2.5" xmlns =" http://java.sun.com/xml/ns/javaee"> Odata

ResourceServlet

ResourceServlet

com.sap.ui5.resource.ResourceServlet

ResourceServlet

/resources/*

ResourceServlet

/test-resources/*

com.sap.ui5.resource.DEV_MODE

false

<过滤器>

<显示名称> CacheControlFilter

<过滤器名称> CacheControlFilter

com.sap.ui5.resource.CacheControlFilter

CacheControlFilter *。html CacheControlFilter *。js CacheControlFilter * .xml CacheControlFilter *。json <过滤器映射> <过滤器名称> CacheControlFilter *。css

SimpleProxyServlet

com.sap.ui5.proxy.SimpleProxyServlet

SimpleProxyServlet

/proxy/*

index.html

结果是没有数据。

我通过F12 -network看到http://localhost:8080/DemoOdata4Service/DemoService.svc/的正确响应:

  1. {@ odata.context:" $ metadata",值:[{name:" Products",URL:" Products"}]}
    1. @ odata.context:" $元数据"
    2. 值:[{name:"产品",网址:"产品"}]

但收到以下错误消息:

  1. 请求URL:http://localhost:8080/Odata/resources/sap-ui-version.json
  2. 请求方法:GET
  3. 状态码:404未找到
有什么建议吗? 谢谢!

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


蚀痕:2018-12

ui5版本:1.65.1

apache olingo v4

遵循本教程:

https://olingo.apache.org/doc/odata4/ tutorials/read/tutorial_read.html

通过邮递员获得正确答案

我想使用ui5表显示数据

index.html:

<!DOCTYPE HTML>

<脚本

src=" resources/sap-ui-core.js"

id =" sap-ui-bootstrap"

data-sap-ui-libs =" sap.m"

data-sap-ui-xx-bindingSyntax =" complex"

data-sap-ui-theme =" sap_bluecrystal">

<!-仅加载移动库" sap.m"和" sap_bluecrystal"主题->

view1.view.xml:

http://www.w3.org/1999/xhtml">

<页面标题="标题">

view1.controller.js:

sap.ui.controller(" Odata.view1",{onBeforeRendering:function(){

var uri =" ../DemoOdata4Service/DemoService.svc";

var oModel = new sap.ui.model.json.JSONModel(uri);

this.getView()。setModel(oModel);

var oTemplate = new sap.m.ColumnListItem({

个单元格:[

new sap.m.Text({文本:" {ID}"}),

new sap.m.Text({text:" {Name}"}),

new sap.m.Text({text:" {Description}"})]});

this.getView()。byId(" _ table1")。bindAggregation(" items",{//路径:"/img/PurchaseOrders",路径:"/img/Products",模板:oTemplate});

}

})

web.xml:

<?xml version =" 1.0" encoding =" UTF-8"?>

http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation =" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ ns/javaee/web-app_2_5.xsd " version =" 2.5" xmlns =" http://java.sun.com/xml/ns/javaee"> Odata

ResourceServlet

ResourceServlet

com.sap.ui5.resource.ResourceServlet

ResourceServlet

/resources/*

ResourceServlet

/test-resources/*

com.sap.ui5.resource.DEV_MODE

false

<过滤器>

<显示名称> CacheControlFilter

<过滤器名称> CacheControlFilter

com.sap.ui5.resource.CacheControlFilter

CacheControlFilter *。html CacheControlFilter *。js CacheControlFilter * .xml CacheControlFilter *。json <过滤器映射> <过滤器名称> CacheControlFilter *。css

SimpleProxyServlet

com.sap.ui5.proxy.SimpleProxyServlet

SimpleProxyServlet

/proxy/*

index.html

结果是没有数据。

我通过F12 -network看到http://localhost:8080/DemoOdata4Service/DemoService.svc/的正确响应:

  1. {@ odata.context:" $ metadata",值:[{name:" Products",URL:" Products"}]}
    1. @ odata.context:" $元数据"
    2. 值:[{name:"产品",网址:"产品"}]

但收到以下错误消息:

  1. 请求URL:http://localhost:8080/Odata/resources/sap-ui-version.json
  2. 请求方法:GET
  3. 状态码:404未找到
有什么建议吗? 谢谢!

付费偷看设置
发送
1条回答
bbpeas
1楼-- · 2020-09-07 08:42

为了保护自己,请使用网络ide。

一周热门 更多>