GithubHelp home page GithubHelp logo

moficodes / spring-client Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 20.0 1.74 MB

This is a sample Spring-Boot application with an MVC and RestController, using a Jenkinsfile to demonstrate how to deploy using the Source-to-Image (S2I) strategy to an OpenShift v3.11 cluster.

Java 93.73% HTML 6.27%

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,

user@host:~$ ./mvnw clean install
user@host:~$ ./mvnw spring-boot:run

Without Maven Wrapper,

user@host:~$ mvn clean install
user@host:~$ mvn spring-boot:run

Test

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

Maven

To download all dependencies for development, run

user@host:~$ 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

moficodes avatar remkohdev avatar

Watchers

 avatar

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.