This example relies on the Fabric8 Maven plugin for its build configuration and uses the fabric8 Java base image.
The application utilizes the Spring @ImportResource
annotation to load a Camel Context definition via a src/main/resources/spring/camel-context.xml file on the classpath.
Important
|
This quickstart can run in 2 modes: standalone on your machine and on Kubernetes / OpenShift Cluster |
You can run this quickstart in the following modes:
-
Kubernetes / Single-node OpenShift cluster
-
Standalone on your machine
The most effective way to run this quickstart is to deploy and run the project on OpenShift.
For more details about running this quickstart on a single-node OpenShift cluster, CI/CD deployments, as well as the rest of the runtime, see the Spring Boot Runtime Guide.
The example provides API documentation of the service using Swagger using the context-path camel-rest-sql/api-doc
. You can access the API documentation from your Web browser at http://spring-boot-camel-rest-sql-MY_PROJECT_NAME.OPENSHIFT_IP_ADDR.nip.io/camel-rest-sql/api-doc.
To run this quickstart as a standalone project on your local machine:
-
Download the project and extract the archive on your local filesystem.
-
Build the project:
$ cd PROJECT_DIR $ mvn clean package
-
Run the service:
$ mvn spring-boot:run
In order to create the config map:
oc create -f ./src/main/resources/configmap.yml
In order to give the right permissions (to read the CM):
oc policy add-role-to-user view system:serviceaccount:PROJECTNAME:default -n PROJECTNAME
Here you can view the props currently loaded:
YOURAPPURL/camel/props