当前位置:网站首页>关于 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
这些自定义配置主要是为了第三方工具的解析使用。
边栏推荐
- Start from scratch blazor server (1) -- project construction
- 合工大苍穹战队视觉组培训Day8——视觉,目标识别
- What is JSP?
- JD Zhang Zheng: practice and exploration of content understanding in advertising scenes
- LNMP环境--部署wordpress
- Database foundation
- 项目练习:表格的查改功能
- C语言之程序环境和预处理
- Hyperlink parsing in MD: parsing `this$ Set() `, ` $` should be preceded by a space or escape character`\`
- 三表联查2
猜你喜欢

Three table joint query 3

WebView basic use

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

UML图介绍

Advanced pointer of C language

Understand the basic properties of BOM and DOM

day07 作业

JDBC程序实现完整步骤

Flex弹性盒布局2

全局String对象(函数类型)+Math对象
随机推荐
2021-06-18 SSM项目中自动装配错误
Process control statement
Ten thousand words analysis ribbon core components and operation principle
Natural sorting: comparable interface, customized sorting: the difference between comparator interface
牛客题目——最小的K个数
Shell编程规范与变量
Getting started with nvida CUDA dirverapi
App crash collection and analysis
ES6数组新增属性
meta-data 占位符的引用
三表联查3
Purchase in Appstore
Gradient ring progress bar
每条你收藏的资讯背后,都离不开TA
js中的函数
Servlet uses cookies to realize the last login time of users
New attributes of ES6 array
JDBC连接数据库
WebView basic use
UML diagram introduction