This is the sample code for session XP106 at SAP TechEd 2022.
To deploy the application, the following steps are required:
- Compile the Java application
- Create the IAS service instance
- Create the XSUAA service instance
- Create the destination service instance
- Deploy the application
Run maven to package the application
mvn clean package
Use the ias service broker and create a service instance (don't forget to replace the placeholders)
cf create-service identity application ias-iasaaddemo
Use the xs-security.json to define the #authentication settings and create a service instance
cf create-service xsuaa application xsuaa-iasaaddemo -c xs-security.json
Use the destination service broker to create a service instance
cf create-service destination lite destination-iasaaddemo
Deploy the application using cf push. It will expect 1 GB of free memory quota.
cf push
cf enable-ssh iasaaddemo
cf restage iasaaddemo
cf ssh iasaaddemo -c "app/META-INF/.sap_java_buildpack/sapjvm/bin/jvmmon <<< 'start debugging'"
cf ssh iasaaddemo -N -T -L 8000:localhost:8000
For Visual Studio Code, create a launch.json file with this content:
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Launch Remote Debugging",
"request": "attach",
"port": 8000,
"hostName": "localhost"
}
]
}