cf create-route <space name> cfapps.eu10.hana.ondemand.com --hostname <host name of App Router>
cf create-route <space name> cfapps.eu10.hana.ondemand.com --hostname <host name of Java App>
mvn archetype:generate "-DarchetypeGroupId=com.sap.cloud.sdk.archetypes" "-DarchetypeArtifactId=scp-cf-tomee" "-DarchetypeVersion=RELEASE"
<plugin>
<groupId>com.sap.cloud.sdk.plugins</groupId>
<artifactId>usage-analytics-maven-plugin</artifactId>
<version>3.18.0</version>
<executions>
<execution>
<goals>
<goal>usage-analytics</goal>
</goals>
<configuration>
<skipUsageAnalytics>true</skipUsageAnalytics>
<generateSalt>true</generateSalt>
<!--
Note: A random salt is auto-generated once the project is built for the first time.
Please keep the generated salt in the POM file, for example, when pushing to git.
To learn more, visit: https://blogs.sap.com/2018/10/23/usage-analytics-s4sdk/
-->
<salt />
</configuration>
</execution>
</executions>
</plugin>
# プロジェクトルートディレクトリから
mvn clean package
---
applications:
- name: rest-java
memory: 1024M
timeout: 300
random-route: false
routes:
- route:
https://<1で登録したRoute>;
path: application/target/rest-java-application.war
buildpacks:
- sap_java_buildpack
env:
TARGET_RUNTIME: tomee7
SET_LOGGING_LEVEL: '{ROOT: INFO, com.sap.cloud.sdk: INFO}'
JBP_CONFIG_SAPJVM_MEMORY_SIZES: 'metaspace:128m..'
# services:
# - my-application-logs
# - my-xsuaa
# - my-destination
# - my-connectivity
# プロジェクトルートディレクトリから
cf push
> sap-cloud-sdk add-approuter
No 'manifest.yml' found.
Enter project name as maintained in Cloud Foundry: rest-java
✔ Creating files
✅ Successfully added approuter to your project.
Generated files might need customization. Documentation available here:
- xs-security.json (for help check https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.02/en-US/e6fc90df44464a29952e1c2c36...
- xs-app.json (for help check https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/c103fb414988447ead2023f7680...
- mainfest.yml (for help check https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/ba527058dc4d423a9e0a69ecc67...
{
"xsappname": "rest-java",
"tenant-mode": "dedicated"
}
cf create-service xsuaa application my-xsuaa -c xs-security.json
cf bind-service rest-java my-xsuaa
cf restage rest-java
{
"welcomeFile": "index.html",
"routes": [{
"source": "/",
"target": "/",
"destination": "rest-java",
"authenticationType": "basic"
}]
}
applications:
- name: router-basic
routes:
- route: >-
https://<1で登録したApp RouterのRoute>
path: .
memory: 128M
buildpacks:
- nodejs_buildpack
env:
# TENANT_HOST_PATTERN: >-
# "rest-java-(.*).cfapps.sap.hana.ondemand.com"
destinations: >-
[{"name":"rest-java","url":"https://<1で登録したJava AppのRoute>","forwardAuthToken":true}]
services:
- my-xsuaa
cf push
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
23 | |
11 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 |