Code Monkey home page Code Monkey logo

spring-client's Introduction

SpringClient - A Simple Spring Application

This application demonstrates simple examples for how to use Spring Boot, Spring MVC and Spring for REST APIs and Spring Service.

Lab

A Lab or Workshop accompanies this application :

Run

Using the Maven Wrapper,

$ ./mvnw clean install
$ ./mvnw spring-boot:run

Without Maven Wrapper,

$ mvn clean install
$ mvn spring-boot:run

Docker

DOCKERHUB_USERNAME=remkohdev
docker image build -t springclient .
docker login docker.io -u $DOCKERHUB_USERNAME
docker tag springclient $DOCKERHUB_USERNAME/springclient:v1.0.0
docker push $DOCKERHUB_USERNAME/springclient:v1.0.0

Test

$ curl -X GET 'http://localhost:8080/api/hello?name=pluto'

Maven

To download all dependencies for development, run

$ mvn dependency:copy-dependencies

Deployment

The Jenkinsfile is written for a Source-to-Image (S2I) deployment to OpenShift 3.11.

Lab coming soon...

Docs

See Java: Get Started with Spring Boot and Java: Create a Spring MVC App with Tomcat and Maven for a tutorial on Spring Boot and Spring MVC.

TODO

  • Replace the 'oc' syntax for the OpenShift command line interface (CLI) by the syntax used for the OpenShift Jenkins Pipeline (DSL) Plugin.
  • Another TODO, add an openshift.selector().exists() condition, before deleting. Currently there is manual step required to make sure the project exists. In addition, if deleting the project resources has not completed fully, the create project will also become an issue. In other words, not fool proof right now.
  • The oc new-app takes a full path URI to the base image, but there has to be a way to reference this by tag and perhaps use the oc import-image as a separate step to make sure it exists. Didn't have time to fix this part.

spring-client's People

Contributors

remkohdev avatar remkohdev-ibm avatar afahmy10 avatar

Forkers

afahmy100

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.