retroredge / spring-boot-sandbox

A simple Spring Boot project for experimenting with the framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spring-boot-sandbox

A simple Spring Boot project for experimenting with the framework.

The application uses Jetty rather than the default Tomcat Web server. See spring-boot-starter-jetty in the POM file.

The root endpoint outputs a parameterised message. The parameters are picked up from Java system properties and environment variables.

The project has Docker file and a shell script to build and run the application using Docker.

Build

./mvnw clean package

Run

java -jar target/spring-boot-sandbox-1.0-SNAPSHOT.jar

Or

./mvnw spring-boot:run

Endpoints

Actuator Endpoints

Run locally in Docker container

./run.sh
http://localhost:8080/

Demonstrate the correlation id filter

curl -H "X-Correlation_ID: 1234" http://localhost:8080/greeting

Allure Reporting

To view via a local server

./mvnw allure:serve

To generate

./mvnw allure:report

TODO

  • Slf4j
  • @MockBean
  • @Bean
  • @Configuration
  • Profiles
  • Lombok

About

A simple Spring Boot project for experimenting with the framework


Languages

Language:Java 88.1%Language:Shell 8.4%Language:Dockerfile 3.5%