The App Dev Practice has created a Spring Boot application that exposes a ReSTful API. The application can be used as a starter spring-boot application or as a unit to deploy to OCP clusters.
The application manages the concept of a Survey Group. This represents the target of surveys for a Red Hat consulting project, the skills required to complete the project, and the employee assigned to the project.
This service is built in a contract-first manner. You can find the API definition hosted at https://studio.apicur.io/apis/26569.
name | version |
---|---|
Java 8 | 1.8.0_231 |
Apache Maven | 3.6.3 |
Spring Boot | 2.2.2 |
H2 Database | 1.4 |
./mvnw clean package
You can run the spring application locally by issueing the following command:
./mvnw spring-boot:run
This will start the application on port 8080. Once started, you should be able to navigate to OpenAPI Spec for a description of the API exposed.
This service comes ready to deploy in an Openshift cluster using the provided Jenkinsfile.
Refer to the instructions here: https://github.com/redhat-appdev-practice/infrastructure/wikis/Deploying-A-Service
This is documentation for deploying the all of Consultant360's CI/CD pipelines and applications. Follow all the instructions to deploy the node service and the jenkins pipeline that will manage the build. You will specifically deploy "spring-rest-surveygroups".
The best way to test the API manually is to use Postman and make calls to your service whether it's on localhost or Openshift.
Alternatively, you can use curl. Ex:
curl http://localhost:8080/surveyGroups/
Can be deployed in code ready workspace using: http://CRW_route_url.com
/f?url=https://raw.githubusercontent.com/redhat-appdev-practice/spring-rest-surveygroups/master/devfile.yaml