Commit fcc7fefb authored by guozhipeng's avatar guozhipeng

部署

parent d550543e
{
"sql": {
"native_hana_associations" : false
"sql": {
"native_hana_associations": false
},
"requires": {
"[production]": {
"auth": "xsuaa",
"db": "hana"
}
}
}
This diff is collapsed.
{
"name": "approuter",
"dependencies": {
"@sap/approuter": "^18.0.0"
},
"engines": {
"node": "^20"
},
"scripts": {
"start": "node node_modules/@sap/approuter/approuter.js"
}
}
{
"routes": [
{
"source": "^/app/(.*)$",
"target": "$1",
"localDir": ".",
"cacheControl": "no-cache, no-store, must-revalidate"
},
{
"source": "^/appconfig/",
"localDir": ".",
"cacheControl": "no-cache, no-store, must-revalidate"
},
{
"source": "^/(.*)$",
"target": "$1",
"destination": "srv-api",
"csrfProtection": true
}
]
}
This diff is collapsed.
{
"name": "deploy",
"dependencies": {
"hdb": "^0",
"@sap/hdi-deploy": "^5"
},
"engines": {
"node": "^22.0.0"
},
"scripts": {
"start": "node node_modules/@sap/hdi-deploy/deploy.js --use-hdb",
"build": "npm i && npx cds build .. --for hana --production"
}
}
{
"file_suffixes": {
"csv": {
"plugin_name": "com.sap.hana.di.tabledata.source"
},
"hdbafllangprocedure": {
"plugin_name": "com.sap.hana.di.afllangprocedure"
},
"hdbanalyticprivilege": {
"plugin_name": "com.sap.hana.di.analyticprivilege"
},
"hdbcalculationview": {
"plugin_name": "com.sap.hana.di.calculationview"
},
"hdbcollection": {
"plugin_name": "com.sap.hana.di.collection"
},
"hdbconstraint": {
"plugin_name": "com.sap.hana.di.constraint"
},
"hdbdropcreatetable": {
"plugin_name": "com.sap.hana.di.dropcreatetable"
},
"hdbflowgraph": {
"plugin_name": "com.sap.hana.di.flowgraph"
},
"hdbfunction": {
"plugin_name": "com.sap.hana.di.function"
},
"hdbgraphworkspace": {
"plugin_name": "com.sap.hana.di.graphworkspace"
},
"hdbhadoopmrjob": {
"plugin_name": "com.sap.hana.di.virtualfunctionpackage.hadoop"
},
"hdbindex": {
"plugin_name": "com.sap.hana.di.index"
},
"hdblibrary": {
"plugin_name": "com.sap.hana.di.library"
},
"hdbmigrationtable": {
"plugin_name": "com.sap.hana.di.table.migration"
},
"hdbprocedure": {
"plugin_name": "com.sap.hana.di.procedure"
},
"hdbprojectionview": {
"plugin_name": "com.sap.hana.di.projectionview"
},
"hdbprojectionviewconfig": {
"plugin_name": "com.sap.hana.di.projectionview.config"
},
"hdbreptask": {
"plugin_name": "com.sap.hana.di.reptask"
},
"hdbresultcache": {
"plugin_name": "com.sap.hana.di.resultcache"
},
"hdbrole": {
"plugin_name": "com.sap.hana.di.role"
},
"hdbroleconfig": {
"plugin_name": "com.sap.hana.di.role.config"
},
"hdbsearchruleset": {
"plugin_name": "com.sap.hana.di.searchruleset"
},
"hdbsequence": {
"plugin_name": "com.sap.hana.di.sequence"
},
"hdbstatistics": {
"plugin_name": "com.sap.hana.di.statistics"
},
"hdbstructuredprivilege": {
"plugin_name": "com.sap.hana.di.structuredprivilege"
},
"hdbsynonym": {
"plugin_name": "com.sap.hana.di.synonym"
},
"hdbsynonymconfig": {
"plugin_name": "com.sap.hana.di.synonym.config"
},
"hdbsystemversioning": {
"plugin_name": "com.sap.hana.di.systemversioning"
},
"hdbtable": {
"plugin_name": "com.sap.hana.di.table"
},
"hdbtabledata": {
"plugin_name": "com.sap.hana.di.tabledata"
},
"hdbtabletype": {
"plugin_name": "com.sap.hana.di.tabletype"
},
"hdbtrigger": {
"plugin_name": "com.sap.hana.di.trigger"
},
"hdbview": {
"plugin_name": "com.sap.hana.di.view"
},
"hdbvirtualfunction": {
"plugin_name": "com.sap.hana.di.virtualfunction"
},
"hdbvirtualfunctionconfig": {
"plugin_name": "com.sap.hana.di.virtualfunction.config"
},
"hdbvirtualpackagehadoop": {
"plugin_name": "com.sap.hana.di.virtualpackage.hadoop"
},
"hdbvirtualpackagesparksql": {
"plugin_name": "com.sap.hana.di.virtualpackage.sparksql"
},
"hdbvirtualprocedure": {
"plugin_name": "com.sap.hana.di.virtualprocedure"
},
"hdbvirtualprocedureconfig": {
"plugin_name": "com.sap.hana.di.virtualprocedure.config"
},
"hdbvirtualtable": {
"plugin_name": "com.sap.hana.di.virtualtable"
},
"hdbvirtualtableconfig": {
"plugin_name": "com.sap.hana.di.virtualtable.config"
},
"properties": {
"plugin_name": "com.sap.hana.di.tabledata.properties"
},
"tags": {
"plugin_name": "com.sap.hana.di.tabledata.properties"
},
"txt": {
"plugin_name": "com.sap.hana.di.copyonly"
},
"hdbeshconfig": {
"plugin_name": "com.sap.hana.di.eshconfig"
}
}
}
[
"src/gen/**/*.hdbview",
"src/gen/**/*.hdbindex",
"src/gen/**/*.hdbconstraint",
"src/gen/**/*_drafts.hdbtable",
"src/gen/**/*.hdbcalculationview"
]
_schema-version: 3.3.0
ID: bookstore
version: 1.0.0-SNAPSHOT
description: "A simple CAP project."
parameters:
enable-parallel-deployments: true
modules:
- name: bookstore-srv
type: java
path: srv
parameters:
buildpack: sap_java_buildpack_jakarta
readiness-health-check-type: http
readiness-health-check-http-endpoint: /actuator/health/readiness
properties:
SPRING_PROFILES_ACTIVE: cloud,sandbox
JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"
JBP_CONFIG_SAP_MACHINE_JRE: '{ version: 21.+ }'
build-parameters:
builder: custom
commands:
- mvn clean package -DskipTests=true --batch-mode
build-result: target/*-exec.jar
provides:
- name: srv-api # required by consumers of CAP services (e.g. approuter)
properties:
srv-url: ${default-url}
requires:
- name: bookstore-auth
- name: bookstore-db
- name: app-api
properties:
CDS_MULTITENANCY_APPUI_URL: ~{url}
- name: bookstore-db-deployer
type: hdb
path: db
parameters:
buildpack: nodejs_buildpack
build-parameters:
builder: custom
commands:
- npm run build
requires:
- name: bookstore-db
- name: bookstore
type: approuter.nodejs
path: app\router
parameters:
keep-existing-routes: true
disk-quota: 256M
memory: 256M
requires:
- name: srv-api
group: destinations
properties:
name: srv-api # must be used in xs-app.json as well
url: ~{srv-url}
forwardAuthToken: true
- name: bookstore-auth
provides:
- name: app-api
properties:
app-protocol: ${protocol}
app-uri: ${default-uri}
url: ${default-url}
resources:
- name: bookstore-auth
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
path: ./xs-security.json
config:
xsappname: bookstore-${org}-${space}
tenant-mode: dedicated
- name: bookstore-db
type: com.sap.xs.hdi-container
parameters:
service: hana
service-plan: hdi-shared
......@@ -43,6 +43,17 @@
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.sap.cds</groupId>
<artifactId>cds-starter-cloudfoundry</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>
......
......@@ -4,3 +4,44 @@ spring:
sql.init.schema-locations: classpath:schema-h2.sql
cds:
data-source.auto-config.enabled: false
security:
mock:
users:
- name: klaus
password: pass_klaus
additional:
firstName: Klaus
lastName: Sussard
email: Klaus.Sussard@mail.com
- name: mia
password: pass_mia
additional:
firstName: Mia
lastName: Bonnellac
email: Mia.Bonnellac@mail.com
- name: sabine
password: pass_sabine
roles:
- Administrators
additional:
firstName: Sabine
lastName: Autumnpike
email: Sabine.Autumnpike@mail.com
---
management:
endpoint:
health:
show-components: always
probes:
enabled: true
endpoints:
web:
exposure:
include: health
health:
defaults:
enabled: false
ping:
enabled: true
db:
enabled: true
{
"xsappname": "bookstore",
"tenant-mode": "dedicated",
"scopes": [
{
"name": "$XSAPPNAME.Administrators",
"description": "Administrators"
}
],
"attributes": [],
"role-templates": [
{
"name": "Administrators",
"description": "generated",
"scope-references": [
"$XSAPPNAME.Administrators"
],
"attribute-references": []
}
],
"role-collections": [
{
"name": "BookStore_Administrators",
"description": "BookStore Administrators",
"role-template-references": ["$XSAPPNAME.Administrators"]
}
],
"oauth2-configuration": {
"redirect-uris": ["https://*.unibetter-ic.com/**"]
}
}
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