This project provides a demo of the changes required to add various interesting Java features.
The main branch currently contains a small 'vanilla' Spring Boot application, which runs on Java 22, builds using Gradle, and includes a simple 'hello world' type controller.
There are several open pull requests demonstrating how to add different features. These pull requests are kept separate (unmerged) to clearly show the necessary changes for each feature without modifying the existing codebase.
The following demos are available as pull requests:
- HTTP endpoint to download/stream a ZIP file containing PDFs (which themselves are also streamed)
- Scheduling of tasks to be completed asynchronously using the Quartz framework
- Use of the Spock Groovy framework for data-driven testing
To build the project, run the following command:
./gradlew clean buildYou can run the application in one of the following ways:
-
Within an IDE: Run the
ShowcaseApplicationSpring Boot app. -
Using the command line:
./gradlew bootRun
Once the application is running, you can test it by sending a request to the following endpoint (assuming the default port is unchanged):
curl "http://localhost:8080/greeting?salutation=good%20morning&name=robin"The application can be built into a Docker image and run in a Docker environment:
-
Build the Docker image:
docker build -t robjwilkins/showcase . -
Run the Docker container:
docker run -p 8080:8080 robjwilkins/showcase
To contribute to this project:
- Clone or fork the repository.
- Create a new branch for your feature.
- Add your feature and commit your changes.
- Create a pull request.
Commit messages should follow this format:
- A single line summarizing the change.
- A more detailed message explaining what the feature is and why it was added.