Running Spring Boot Application on SAP Cloud Platform

Cloud Foundry and Neo Environment

Chairat Onyaem
Sep 23, 2017 · 5 min read

Create a Hello World Application

A New Project Named ‘spring-boot-helloscp’

Build and Deploy on SCP Cloud Foundry

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
Deploying Application on SCP Cloud Foundry Environment
Application Dashboard on Cloud Foundry Environment
Spring Boot Application on Cloud Foundry Environment

Deploy using Command Line Interface (CLI)

Deploying JAR file Result in Unknown Error
$ cf api https://api.cf.eu10.hana.ondemand.com
Setting api endpoint to https://api.cf.eu10.hana.ondemand.com...
OK
api endpoint: https://api.cf.eu10.hana.ondemand.com
api version: 2.94.0
Not logged in. Use 'cf login' to log in.
$ cf login
API endpoint: https://api.cf.eu10.hana.ondemand.com
Email> xxxxx@xxxxx.comPassword>
Authenticating...
OK
Targeted org Xxxxxxxxxxxtrial_trialTargeted space devAPI endpoint: https://api.cf.eu10.hana.ondemand.com (API version: 2.94.0)
User: xxxxx@xxxxx.com
Org:
Xxxxxxxxxxxtrial_trial
Space:
dev
Showing health and status for app app12345 in org Xxxxxxxxxxxtrial_trial / space dev as xxxxx@xxxxx.com...
OK
requested state: started
instances: 1/1
usage: 512M x 1 instances
urls: app12345.cfapps.eu10.hana.ondemand.com
last uploaded: Sun Oct 1 04:24:50 UTC 2017
stack: cflinuxfs2
buildpack: client-certificate-mapper=1.3.0_RELEASE container-security-provider=1.10.0_RELEASE java-buildpack=v3.19-https://github.com/cloudfoundry/java-buildpack.git#727297d java-main open-jdk-like-jre=1.8.0_144 open-jdk-like-memory-calculator=2.0.2_RELEASE open-...
state since cpu memory disk details
#0
running 2017-10-01 11:26:01 AM 49.5% 282.1M of 512M 142M of 512M
Deployed Application via CF CLI

Build and Deploy on Neo Environment

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
<scope>provided</scope>
</dependency>
<packaging>war</packaging>
Deploying Application on SCP Neo Environment
Application Dashboard on Neo Environment
Spring Boot Application on Neo Environment
<finalName>ROOT</finalName>

Deploying Options

Source Codes

Make JAR, not WAR.


Chairat.me

Personal blog of a developer who passionate in new practices and technologies

Chairat Onyaem

Written by

Developer — chairat.me

Chairat.me

Personal blog of a developer who passionate in new practices and technologies