Commit 5bcf7959 authored by guozhipeng's avatar guozhipeng

两个页面

parent ab00a61f
# Generated with Cloud MTA Build Tool version 1.2.33
version=0.0.1
MBT=C:/Users/admin/AppData/Roaming/npm/node_modules/mbt/unpacked_bin/mbt.exe
ifndef p
$(error platform flag is expected. e.g. use make -f makefile.mta p=cf)
endif
target_provided=true
ifndef t
t="$(CURDIR)"
target_provided=false
endif
ifndef strict
strict=true
endif
ifndef mtar
mtar="*"
endif
modules := $(shell $(MBT) provide modules -d=dev)
modules := $(subst ],,$(subst [,,$(modules)))
# List of all the recipes to be executed during the build process
.PHONY: all pre_validate pre_build validate $(modules) post_build meta mtar cleanup
# Default target compile all
all: pre_validate pre_build validate $(modules) post_build meta mtar cleanup
# Validate mta.yaml
pre_validate:
@$(MBT) validate -r=${strict} -x="paths"
pre_build: pre_validate
@$(MBT) project build -p=pre
# Execute module build
define build_rule
$(1): validate
@$(MBT) module build -m=$(1) -p=${p} -t=${t}
endef
$(foreach mod,$(modules),$(eval $(call build_rule,$(mod))))# Create META-INF folder with MANIFEST.MF & mtad.yaml
meta: $(modules) post_build
@$(MBT) gen meta -p=${p} -t=${t}
post_build: $(modules)
@$(MBT) project build -p=post -t=${t}
# Validate mta.yaml
validate: pre_build
@$(MBT) validate -r=${strict}
# Pack as MTAR artifact
mtar: $(modules) meta
@$(MBT) gen mtar --mtar=${mtar} --target_provided=${target_provided} -t=${t}
cleanup: mtar
# Remove tmp folder
@$(MBT) clean -t=${t}
\ No newline at end of file
# 注意事项
## 参考文档
Build a Business Application Using CAP for Java
使用 CAP for Java 构建业务应用程序
https://developers.sap.com/mission.cap-java-app.html
注意:JDK需要21
本地开发启动命令:
mvn clean spring-boot:run
浏览器访问地址:http://localhost:8080/
## 打包部署
命令:
cf api https://api.cf.cn40.platform.sapcloud.cn
登录BTP gzpTest子账户部署命令:
cf login -a https://api.cf.cn40.platform.sapcloud.cn -o "Shenzhen-Lianchuangjie-Technology-Co-Ltd-test-cnrc164l" -s gzpTest -u zhipeng.guo@boscloud.cn
密码: Gzp@123456
打包命令:
mbt build -t gen --mtar mta.mtar
部署命令:
cf deploy gen/mta.mtar
No preview for this file type
......@@ -7,6 +7,9 @@
"": {
"name": "books",
"version": "0.0.1",
"dependencies": {
"books": "file:"
},
"devDependencies": {
"@sap/ux-ui5-tooling": "1",
"@ui5/cli": "^3.0.0",
......@@ -8069,6 +8072,10 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/books": {
"resolved": "",
"link": true
},
"node_modules/boxen": {
"version": "5.1.2",
"resolved": "https://registry.npmmirror.com/boxen/-/boxen-5.1.2.tgz",
......
## Application Details
| |
| ------------- |
|**Generation Date and Time**<br>Mon Jan 13 2025 17:44:45 GMT+0800 (中国标准时间)|
|**App Generator**<br>@sap/generator-fiori-elements|
|**App Generator Version**<br>1.11.3|
|**Generation Platform**<br>Visual Studio Code|
|**Template Used**<br>List Report Page V4|
|**Service Type**<br>Local Cap|
|**Service URL**<br>http://localhost:4004/odata/v4/OrdersService/
|**Module Name**<br>orders|
|**Application Title**<br>Orders|
|**Namespace**<br>ns|
|**UI5 Theme**<br>sap_horizon|
|**UI5 Version**<br>1.131.1|
|**Enable Code Assist Libraries**<br>False|
|**Enable TypeScript**<br>False|
|**Add Eslint configuration**<br>False|
|**Main Entity**<br>Orders|
|**Navigation Entity**<br>None|
## orders
Orders
### Starting the generated app
- This app has been generated using the SAP Fiori tools - App Generator, as part of the SAP Fiori tools suite. In order to launch the generated app, simply start your CAP project (```mvn spring-boot:run```) and navigate to the following location in your browser:
http://localhost:8080/orders/webapp/index.html
#### Pre-requisites:
1. Active NodeJS LTS (Long Term Support) version and associated supported NPM version. (See https://nodejs.org)
using OrdersService as service from '../../srv/services';
annotate service.Orders with @(
UI.LineItem : [
{
$Type : 'UI.DataField',
Label : 'total',
Value : total,
},
{
$Type : 'UI.DataField',
Label : 'currency_code',
Value : currency_code,
},
]
);
annotate service.Orders with @(
UI.FieldGroup #GeneratedGroup1 : {
$Type : 'UI.FieldGroupType',
Data : [
{
$Type : 'UI.DataField',
Label : 'total',
Value : total,
},
{
$Type : 'UI.DataField',
Label : 'currency_code',
Value : currency_code,
},
],
},
UI.Facets : [
{
$Type : 'UI.ReferenceFacet',
ID : 'GeneratedFacet1',
Label : 'General Information',
Target : '@UI.FieldGroup#GeneratedGroup1',
},
]
);
sap.ui.define(
["sap/fe/core/AppComponent"],
function (Component) {
"use strict";
return Component.extend("ns.orders.Component", {
metadata: {
manifest: "json"
}
});
}
);
\ No newline at end of file
//@ui5-bundle ns/orders/Component-preload.js
sap.ui.require.preload({
"ns/orders/Component.js":function(){
sap.ui.define(["sap/fe/core/AppComponent"],function(e){"use strict";return e.extend("ns.orders.Component",{metadata:{manifest:"json"}})});
},
"ns/orders/i18n/i18n.properties":'# This is the resource bundle for ns.orders\n\n#Texts for manifest.json\n\n#XTIT: Application name\nappTitle=Orders\n\n#YDES: Application description\nappDescription=Orders',
"ns/orders/manifest.json":'{"_version":"1.58.0","sap.app":{"id":"ns.orders","type":"application","i18n":"i18n/i18n.properties","applicationVersion":{"version":"0.0.1"},"title":"{{appTitle}}","description":"{{appDescription}}","resources":"resources.json","sourceTemplate":{"id":"@sap/generator-fiori:lrop","version":"1.11.3","toolsId":"c798f7f5-c5e6-4c9a-8f24-c78035263d30"},"dataSources":{"mainService":{"uri":"/odata/v4/OrdersService/","type":"OData","settings":{"annotations":[],"localUri":"localService/metadata.xml","odataVersion":"4.0"}}}},"sap.ui":{"technology":"UI5","icons":{"icon":"","favIcon":"","phone":"","phone@2":"","tablet":"","tablet@2":""},"deviceTypes":{"desktop":true,"tablet":true,"phone":true}},"sap.ui5":{"flexEnabled":true,"dependencies":{"minUI5Version":"1.131.1","libs":{"sap.m":{},"sap.ui.core":{},"sap.ushell":{},"sap.fe.templates":{}}},"contentDensities":{"compact":true,"cozy":true},"models":{"i18n":{"type":"sap.ui.model.resource.ResourceModel","settings":{"bundleName":"ns.orders.i18n.i18n"}},"":{"dataSource":"mainService","preload":true,"settings":{"synchronizationMode":"None","operationMode":"Server","autoExpandSelect":true,"earlyRequests":true}},"@i18n":{"type":"sap.ui.model.resource.ResourceModel","uri":"i18n/i18n.properties"}},"resources":{"css":[]},"routing":{"config":{},"routes":[{"pattern":":?query:","name":"OrdersList","target":"OrdersList"},{"pattern":"Orders({key}):?query:","name":"OrdersObjectPage","target":"OrdersObjectPage"}],"targets":{"OrdersList":{"type":"Component","id":"OrdersList","name":"sap.fe.templates.ListReport","options":{"settings":{"contextPath":"/Orders","variantManagement":"Page","navigation":{"Orders":{"detail":{"route":"OrdersObjectPage"}}}}}},"OrdersObjectPage":{"type":"Component","id":"OrdersObjectPage","name":"sap.fe.templates.ObjectPage","options":{"settings":{"editableHeaderContent":false,"contextPath":"/Orders"}}}}}},"sap.fiori":{"registrationIds":[],"archeType":"transactional"}}'
});
//# sourceMappingURL=Component-preload.js.map
{"version":3,"file":"Component-preload.js","sections":[{"offset":{"line":1,"column":0},"map":{"version":3,"names":[],"sources":["Component-preload.js?bundle-code-0"],"mappings":"AAAA;AACA","sourcesContent":["sap.ui.require.preload({\n"],"sourceRoot":""}},{"offset":{"line":3,"column":0},"map":{"version":3,"file":"Component.js","names":["sap","ui","define","Component","extend","metadata","manifest"],"sources":["Component-dbg.js"],"mappings":"AAAAA,IAAIC,GAAGC,OACH,CAAC,4BACD,SAAUC,GACN,aAEA,OAAOA,EAAUC,OAAO,sBAAuB,CAC3CC,SAAU,CACNC,SAAU,SAGtB","ignoreList":[],"sourceRoot":""}}]}
\ No newline at end of file
sap.ui.define(["sap/fe/core/AppComponent"],function(e){"use strict";return e.extend("ns.orders.Component",{metadata:{manifest:"json"}})});
//# sourceMappingURL=Component.js.map
\ No newline at end of file
{"version":3,"file":"Component.js","names":["sap","ui","define","Component","extend","metadata","manifest"],"sources":["Component-dbg.js"],"mappings":"AAAAA,IAAIC,GAAGC,OACH,CAAC,4BACD,SAAUC,GACN,aAEA,OAAOA,EAAUC,OAAO,sBAAuB,CAC3CC,SAAU,CACNC,SAAU,SAGtB","ignoreList":[]}
\ No newline at end of file
# This is the resource bundle for ns.orders
#Texts for manifest.json
#XTIT: Application name
appTitle=Orders
#YDES: Application description
appDescription=Orders
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Orders</title>
<style>
html, body, body > div, #container, #container-uiarea {
height: 100%;
}
</style>
<script
id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/1.131.1/resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-resourceroots='{
"ns.orders": "./"
}'
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true"
data-sap-ui-frameOptions="trusted"
></script>
</head>
<body class="sapUiBody sapUiSizeCompact" id="content">
<div
data-sap-ui-component
data-name="ns.orders"
data-id="container"
data-settings='{"id" : "ns.orders"}'
data-handle-validation="true"
></div>
</body>
</html>
\ No newline at end of file
{
"_version": "1.58.0",
"sap.app": {
"id": "ns.orders",
"type": "application",
"i18n": "i18n/i18n.properties",
"applicationVersion": {
"version": "0.0.1"
},
"title": "{{appTitle}}",
"description": "{{appDescription}}",
"resources": "resources.json",
"sourceTemplate": {
"id": "@sap/generator-fiori:lrop",
"version": "1.11.3",
"toolsId": "c798f7f5-c5e6-4c9a-8f24-c78035263d30"
},
"dataSources": {
"mainService": {
"uri": "/odata/v4/OrdersService/",
"type": "OData",
"settings": {
"annotations": [],
"localUri": "localService/metadata.xml",
"odataVersion": "4.0"
}
}
}
},
"sap.ui": {
"technology": "UI5",
"icons": {
"icon": "",
"favIcon": "",
"phone": "",
"phone@2": "",
"tablet": "",
"tablet@2": ""
},
"deviceTypes": {
"desktop": true,
"tablet": true,
"phone": true
}
},
"sap.ui5": {
"flexEnabled": true,
"dependencies": {
"minUI5Version": "1.131.1",
"libs": {
"sap.m": {},
"sap.ui.core": {},
"sap.ushell": {},
"sap.fe.templates": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "ns.orders.i18n.i18n"
}
},
"": {
"dataSource": "mainService",
"preload": true,
"settings": {
"synchronizationMode": "None",
"operationMode": "Server",
"autoExpandSelect": true,
"earlyRequests": true
}
},
"@i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"uri": "i18n/i18n.properties"
}
},
"resources": {
"css": []
},
"routing": {
"config": {},
"routes": [
{
"pattern": ":?query:",
"name": "OrdersList",
"target": "OrdersList"
},
{
"pattern": "Orders({key}):?query:",
"name": "OrdersObjectPage",
"target": "OrdersObjectPage"
}
],
"targets": {
"OrdersList": {
"type": "Component",
"id": "OrdersList",
"name": "sap.fe.templates.ListReport",
"options": {
"settings": {
"contextPath": "/Orders",
"variantManagement": "Page",
"navigation": {
"Orders": {
"detail": {
"route": "OrdersObjectPage"
}
}
}
}
}
},
"OrdersObjectPage": {
"type": "Component",
"id": "OrdersObjectPage",
"name": "sap.fe.templates.ObjectPage",
"options": {
"settings": {
"editableHeaderContent": false,
"contextPath": "/Orders"
}
}
}
}
}
},
"sap.fiori": {
"registrationIds": [],
"archeType": "transactional"
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment