Minimal Spring Boot based RESTful 'Hello World' example, including Swagger.
Java 21, Spring Boot
The following items should be installed in your system:
- Java 21 or newer.
- git command line tool (https://help.github.com/articles/set-up-git)
- Your preferred IDE (IDEA preferably)
This application is a Spring Boot application built using Maven. You can build a jar file and run it from the command line:
git clone https://github.com/IQKV/quickstart-mvc-rest-hello-world.git
cd quickstart-mvc-rest-hello-world
./mvnw package
java -jar target/*.jar
You might also want to use Maven's spring-boot:run
goal - applications run in an exploded form, as they do in your IDE:
./mvnw spring-boot:run -Dspring-boot.run.profiles=local -P dev
Now you can access to the Swagger UI here: http://localhost:8080/swagger-ui.html
- On the command line
git clone https://github.com/IQKV/quickstart-mvc-rest-hello-world.git
- Inside IDE
In the main menu, choose File -> Open
and select the HelloWorldApplication pom.xml. Click on the Open
button.
Activate "local" profile in the Run settings or set it via environment
variables. instruction
Wait to indexing completion and push the green "play" button.
- Navigate to Swagger UI
Visit http://localhost:8080/swagger-ui.html in your browser.
The code follows Google Code Conventions. Code quality is measured by:
This project contains JUnit tests, Hamcrest matchers, Mockito test doubles, Wiremock stubs, etc. You can run the test suite using
./mvnw verify -Puse-qulice
The minimum percentage of code coverage required for the workflow to pass is 80%.
Project uses a three-segment CalVer scheme, with a short year in the major version slot, short month in the minor version slot, and micro/patch version in the third and final slot.
YY.MM.MICRO
- YY - short year - 6, 16, 106
- MM - short month - 1, 2 ... 11, 12
- MICRO - "patch" segment