This post walks you through the steps of creating a Contact Form Example with Java, Spring Boot, FreeMarker and Amazon SES.

What you'll build

What you'll need

Stack

  • Java, Java Mail API
  • Spring Boot
  • FreeMarker
  • HTML, CSS

Project structure

├── src
│   └── main
│       ├── java
│       │   └── com
│       │       └── hellokoding
│       │           └── form
│       │               ├── model
│       │               │   ├── MailProperties.java
│       │               │   └── User.java
│       │               ├── service
│       │               │   ├── SESService.java
│       │               │   └── SendingMailService.java
│       │               ├── web
│       │               │   └── FormController.java
│       │               └── WebApplication.java
│       └── resources
│           ├── static
│           │   ├── css
│           │   │   └── main.css
│           │   └── js
│           │       └── main.js
│           ├── templates
│           │   └── form.ftl
│           └── application.properties
└── pom.xml

Project dependencies


Data transfer object


Service



Controller


View template


Application Configuration




Run the application

mvn clean spring-boot:run

Source code

[email protected]:hellokoding/form-contact-java-springboot-freemarker-awsses.git

https://github.com/hellokoding/form-contact-java-springboot-freemarker-awsses