Skip to content

redhat-appdev-practice/spring-rest-surveygroups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot ReSTful API Example

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.

Survey Groups API

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.

API Definition

This service is built in a contract-first manner. You can find the API definition hosted at https://studio.apicur.io/apis/26569.

Technologies

name version
Java 8 1.8.0_231
Apache Maven 3.6.3
Spring Boot 2.2.2
H2 Database 1.4

Building

./mvnw clean package

Running Locally

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.

Deploying the application in Openshift

This service comes ready to deploy in an Openshift cluster using the provided Jenkinsfile.

Steps to build and deploy in Openshift

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".

Manually testing the API

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/

Code Ready Workspace

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published