Spring Boot MVC Sample

This is a very simple Spring Boot (gradle & maven) project that is using

The purpose of the sample is to show the setup of the gradle, the maven plugin and the processors. The sample contains a build.gradle and a build.gradle.kts build file.

Running with gradle

Clone the project from GitHub, navigate into the project root folder samples/spring-mvc and run

 ../../gradlew bootRun

to start the sample application.

Running with maven

../../mvnw spring-boot:run

Note that the versions in the pom.xml are probably not up to date.

Sample Endpoints

the sample has a few simple endpoints described with OpenAPI in src/api. With IDEA you can call the endpoints by running the requests from the requests.http file.

ping

curl http://localhost:8080/ping

echo

curl http://localhost:8080/echo?source=foo