Goal was to create a small contact form with some front-end and back-end validation.
The form itself does nothing besides that, not saving or sending user input. Back-end validation happens after POST submit.
Included JUnit tests for Controller actions and form DTO validation.
Pull the repo locally and import it in your favourite IDE. I use STS.
Usually when starting Spring boot would install all the required dependancies for you but if that doesn't happen right click on the project -> run as -> maven install
Alternatively you can do it through the console
mvn installif maven is not installed on the machine execute this instead at the root of the repository
mvnw installBoot the server right clicking project -> run as -> spring boot app.
When app is booted visit localhost:8080/contact to see all the magic happen.
Executing tests can be done via IDE or Console again:
project -> run as -> JUnit test or alternatively can be run in console:
mvn clean testor if maven is not installed.
mvnw clean testSpring Boot: 3.0.6
Java: 20
Spring Boot
Thymeleaf
Bootstrap
In order to execute commands in CMD, java will need to be added to home path. Applies to windows, mac and linux machines. Please see here on how to do this.