IBM Cloud Basic Web Starter for Spring
The IBM Cloud Basic Web Starter in Java provides a starting point for creating web applications running on Spring.
To deploy this application to IBM Cloud using a toolchain click the Create Toolchain button.
- Maven
- Java 8: Any compliant JVM should work.
Capabilities are provided through dependencies in the pom.xml file.
The ports are set to the defaults of 8080 for http and 8443 for https and are exposed to the CLI in the cli-config.yml file.
The project contains IBM Cloud specific files that are used to deploy the application as part of a IBM Cloud DevOps flow. The .bluemix
directory contains files used to define the IBM Cloud toolchain and pipeline for your application. The manifest.yml
file specifies the name of your application in IBM Cloud, the timeout value during deployment and which services to bind to.
Credentials are either taken from the VCAP_SERVICES environment variable that IBM Cloud provides or from environment variables passed in by the config file src/main/resources/application-local.properties
.
To build and run the application:
mvn install
java -jar ./target/dms-1.0-SNAPSHOT.jar
To run the application in Docker use the Docker file called Dockerfile
. If you do not want to install Maven locally you can use Dockerfile-tools
to build a container with Maven installed.
The application exposes the following endpoints:
- Health endpoint:
<host>:<port>/health
e.g. http://localhost:8080/health - Web content:
<host>:<port>
The ports are set in the pom.xml file and exposed to the CLI in the cli-config.yml file.
This project was generated using:
- generator-ibm-java v5.12.4
- ibm-java-codegen-common v^3.0.3
- generator-ibm-service-enablement v^2.5.1
- generator-ibm-cloud-enablement v^1.2.2
- generator-ibm-java-spring v2.2.4