i066088 / SAPTechEd22

Demo code for session XP160 at SAP TechEd 2022

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

This is the sample code for session XP106 at SAP TechEd 2022.

Deployment on Cloud Foundry

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

Compile the Java application

Run maven to package the application

mvn clean package

Create the identity service instance for obtaining the

Use the ias service broker and create a service instance (don't forget to replace the placeholders)

cf create-service identity application ias-iasaaddemo

Create the xsuaa service instance

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

Create the destination service instance

Use the destination service broker to create a service instance

cf create-service destination lite destination-iasaaddemo

Deploy the application

Deploy the application using cf push. It will expect 1 GB of free memory quota.

cf push

Appendix

Enable remote debugging

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

Connect your IDE to remote debugging endpoint

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"
        }
    ]
}

About

Demo code for session XP160 at SAP TechEd 2022

License:Apache License 2.0


Languages

Language:Java 54.2%Language:JavaScript 28.7%Language:HTML 17.0%Language:CSS 0.1%