A simple Spring Boot application with a hello world endpoint, built with Maven and JDK 17, designed for deployment to OpenShift using Source-to-Image (S2I).
- JDK 17
- Maven 3.8+
- OpenShift CLI (oc)
To build the application locally:
mvn clean packageTo run the application locally:
mvn spring-boot:runThe application will be available at http://localhost:8080
- Log in to your OpenShift cluster:
oc login <your-openshift-url>- Create a new project or use an existing one:
oc new-project hello-openshift- Create a new application using S2I:
oc new-app --name=hello-openshift java:17~https://your-git-repo-url --context-dir=/ --strategy=source- Expose the service to create a route:
oc expose svc/hello-openshift- Get the route URL:
oc get route hello-openshiftVisit the URL to see your application running on OpenShift.