Skip to content

jakolehm/mar-sample-spring-boot

 
 

Repository files navigation

Managed Application Runtime - Spring Boot Application Example

This is an example Spring Boot application for Qt Cloud Services - Managed Application Runtime ("MAR"). More information about Spring Boot.

Getting Started

See the Managed Application Runtime getting started documentation at Qt Cloud Services Developer Documentation

Details About This Example

Procfile

Upon deployed and launched in Cloud Qt Cloud Services the MAR provides an environmental variable $PORT for which the HTTP requests from the load balancer port 80 are forwarded into.

Running and Testing Application Locally

You can start this application from the application root directory with the same following command as declared in the Procfile once the project has been built with Maven:

mvn clean install
java $JAVA_OPTS -Dserver.port=$PORT -jar target/*.jar

You may replace the $PORT environmental variable with the chosen port number that your local shell process is privileged to run. If the $PORT variable is omitted, the HTTP server defaults the port 8080.

Once the server has started with the default port number, test the server with your web browser at address http://127.0.0.1:8080.

Deploying to Cloud

Please see the Qt Cloud Services Developer Documentation

NOTE: Without tweaking any command-line Java arguments regarding the heap memory usage deploy the sample app only to the instance which fulfills the following Runtime Size: ar-1-small (2CU, 512MB)

About

An example Java Spring Boot application for Qt Cloud Services - Managed Application Runtime

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages