Skip to content

MerziAd/spring-boot-hello-world-rest

 
 

Repository files navigation

README

Minimal Spring Boot based RESTful 'Hello World' example, including Swagger (using Springfox) and Docker (Also see https://spring.io/guides/gs/rest-service/)

Requirements

  • JDK: 1.8
  • Maven version: 3.3.3 (Please double check Maven .m2/settings.xml)
  • Either Tomcat: 8 (please build.sh)
  • or Docker (please see below)

Build and deploy

  • Configure mail server inside src/main/resources/application.properties
  • sh build.sh

Browser

http://127.0.0.1:8080/hello-world-webapp-1.0.0-SNAPSHOT/

Docker

  • Build webapp as jar file (see pom.xml)
  • Start Docker
  • Build image: docker build -t spring-boot-hello-world .
  • Show images: docker images ** Remove image: docker rmi -f IMAGE ID
  • Run image: docker run -p 8080:8080 spring-boot-hello-world
  • Show docker processes: docker ps
  • Stop specific docker process: docker stop CONTAINER ID
  • Request in browser: http://127.0.0.1:8080/swagger-ui.html

Specification and Testing

https://www.yulup.com/en/projects/fe937e1d-3bb4-4012-a963-04848bd955ba/index.html

IntelliJ IDEA

About

Spring Boot based RESTful 'Hello World'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 93.6%
  • Shell 2.6%
  • Dockerfile 1.8%
  • FreeMarker 1.5%
  • HTML 0.5%