This is a Spring Boot Example Application
oc new-project example-spring-boot
oc new-app https://github.com/appuio/example-spring-boot-helloworld.git --strategy=docker --name=appuio-spring-boot-ex
oc expose service appuio-spring-boot-ex
Take the pre built image from Dockerhub
oc new-app appuio/example-spring-boot
Build application with gradle:
./gradlew clean build
Run application with gradle:
./gradlew bootRun
Build Image with buildah:
buildah bud -t example-spring-boot-helloworld .
Run Image with podman:
podman run -ti -p 8080:8080 -p 9000:9000 localhost/example-spring-boot-helloworld:latest
- Application: http://localhost:8080
- Health: http://localhost:9000/health
- Prometheus: http://localhost:9000/prometheus
Enable request logs by setting the value of the environment variable LOGGING_LEVEL_CH_APPUIO_TECHLAB_CONTROLLER_REQUESTDURATIONFILTER
to DEBUG
.