Skip to content

Java application with "Spring Boot" that shows how to implement an REST-API.

License

Notifications You must be signed in to change notification settings

MDecker-MobileComputing/Java_RestApi_SpringBoot

Repository files navigation

Rest-API with Spring Boot


This repository contains a small Spring Boot application that shows how to implement a basic REST API.


Additional information concerning this application can be found on the Wiki pages for this repository, but these pages are in German only.


See this repository for another Java application that implements a REST API, but not with Spring Boot.



Running the application


To start the application (i.e. to start the web server) you have several options:

  • On the command line (you need to have installed Apache Maven):

    • Run script maven_run.bat in Window's cmd.exe ("DOS Box").

    • Enter the following command (starts goal run of plugin spring-boot):

      mvn spring-boot:run


You can also generate a so called Fat Jar by running script mvn_package.bat. This should produce a file with suffix jar in folder target/. This file contains all required dependencies (that's why is called "fat") and can be executed by a command like the following one:

java -jar restapidemo-0.0.1-SNAPSHOT.jar

See this page in the Wiki for this repository on how to define a Run Configuration for running Maven goal spring-boot:run in Eclipse IDE.



JavaDoc


Execute script maven_javadoc.bat in Window's cmd.exe; the output files are written to folder target/site/apidocs.



License


See the LICENSE file for license rights and limitations (BSD 3-Clause License).

See libraries and frameworks used as dependencies (see file pom.xml) have their own licenses.