Coder Social home page Coder Social logo

sample-rest-api's Introduction

sample-rest-api

Really basic rest service with one GET endpoint, /hello

Building

Make sure you have a JDK installed (see below)

This project uses Gradle for dependency/build management.

There are two types of artifacts you can build from this repository - war and executable jar:

  • ./gradlew clean war - creates build/libs/spring-boot-rest.war
  • ./gradlew clean bootJar - creates build/libs/spring-boot-rest.jar
    • Run this jar using embedded Tomcat: java -jar build/libs/spring-boot-rest.jar

Install JDK

You will need a JDK installed to build this project. For OSX: https://formulae.brew.sh/cask/temurin

Pro Tip: install multiple versions and add an alias to quickly switch JDKs

Installed:

$ brew list --casks --verbose --versions      
temurin8 8,302:b08
temurin11 11.0.12,7
temurin 16.0.2,7

Aliases in bash profile:

setJdk8='export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)'
setJdk11='export JAVA_HOME=$(/usr/libexec/java_home -v 11)'
setJdk16='export JAVA_HOME=$(/usr/libexec/java_home -v 16)'

In action:

$ setJdk8 && java -version 
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (Temurin)(build 25.302-b08, mixed mode)
$ setJdk11 && java -version
openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7)
OpenJDK 64-Bit Server VM Temurin-11.0.12+7 (build 11.0.12+7, mixed mode)
$ setJdk16 && java -version
openjdk version "16.0.2" 2021-07-20
OpenJDK Runtime Environment Temurin-16.0.2+7 (build 16.0.2+7)
OpenJDK 64-Bit Server VM Temurin-16.0.2+7 (build 16.0.2+7, mixed mode, sharing)

sample-rest-api's People

Contributors

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