当前位置:网站首页>关于 SAP UI5 应用 ui5.yaml 里的 paths 映射问题
关于 SAP UI5 应用 ui5.yaml 里的 paths 映射问题
2022-07-27 15:06:00 【汪子熙】
url 里多了一个 webapp:

此刻都是正确的:

可能因为这个 webapp 文件夹的原因:

这个 upload 属性可能不能硬编码成其他的,否则上传到服务器之后,又要重新修改:
这个 upload 会根据 index.html 所在的路径,自动补全之前的代码。
根据项目类型,UI5 Tooling 要求 SAP UI5 的项目源文件位于特定目录中。
如果项目的源代码位于不同的目录中,则需要相应地配置路径映射。 根据项目的类型,有几种不同的路径映射可用。
请注意,所有配置的路径必须以 POSIX 编写(即仅使用正斜杠 /)并相对于项目的根目录。
打开 ui5.yaml 文件,将 webapp 的映射路径修改成 webapp:
specVersion: '2.3'
metadata:
name: "sap.m.tutorial.walkthrough.109"
type: application
resources:
configuration:
paths:
webapp: webapp
重新打开浏览器,输入 localhost:8080:

修改之后刷新,upload url 之前就不会出现 webapp 了:
可以使用如下代码设置 .properties 文件的 encoding 属性:
resources:
configuration:
propertiesFileSourceEncoding: UTF-8
默认情况下,UI5 Tooling 需要 *.properties i18n 文件的不同编码,具体取决于项目的规范版本:
- 2.0+: 默认值为 UTF-8
- 0.1, 1.0 or 1.1:这些版本的 UI5 Tools,默认 encoding 值为 ISO-8859-1
UI5 Tooling 将以给定的编码读取项目的相应文件。 任何非 ASCII 字符都将替换为相应的 Unicode 转义序列。 这允许开发人员将生成的文件部署到任何环境,而与它期望如何编码 *.properties 文件无关。
除此之外,我们还可以进行一些自定义设置,这些配置从 UI5 CLI v2.2.0 开始可用,并且仅适用于定义规范版本 2.1 或更高版本的项目。
一个例子如下:
customConfiguration:
myTool:
key: value
myOtherTool:
otherKey: otherValue
这些自定义配置主要是为了第三方工具的解析使用。
边栏推荐
- Three table joint query 3
- Basic use and optimization of uitableview
- How does vs2019 C language run multiple projects at the same time, how to add multiple source files containing main functions in a project and debug and run them respectively
- JSP El expression, JSTL tag
- Swift QQ授权登录 坑集
- 牛客题目——最小的K个数
- JDBC程序实现完整步骤
- The difference between MVC and MVP and MVVM
- File类字节输入、输出流
- Data collection: skillfully using Bloom filter to extract data summary
猜你喜欢
随机推荐
高精度定时器
JD Zhang Zheng: practice and exploration of content understanding in advertising scenes
Servlet用Cookie实现用户上次登录时间
Natural sorting: comparable interface, customized sorting: the difference between comparator interface
MPC5744p时钟模块
JDBC连接数据库
Jerry's maximum volume prompt sound cannot be broadcast [article]
移动端基础
合工大苍穹战队视觉组培训Day7——视觉,jetson naon与D435i
Dynamic memory allocation in C language
mysql视图及存储过程
ES6数组的方法及伪数组转数组方法
C语言之动态内存分配
这种精度高,消耗资源少的大模型稀疏训练方法被阿里云科学家找到了!已被收录到IJCAI
What is JSP?
Servlet Chinese garbled setcontenttype setting is invalid
Purchase in Appstore
js中的函数
This large model sparse training method with high accuracy and low resource consumption has been found by Alibaba cloud scientists! Has been included in IJCAI
Share a scheme of "redis" to realize "chat round system" that can't be found on the Internet









