After building everything, the following commands can be used to run the User Registration microservice:
$ cd spring-boot-2-user-registration
$ mvn spring-boot:run
After starting the User Registration microservice, an HTTP GET request can be sent to the http://localhost:8080/users/reset-password URL with the email as follows:
This will return a status 200 and a reset password request to the resetPasswordRequests Apache Kafka topic, which will be consumed by the Email Formatter consumer to format and send the email to the SMTP server.
After some time, the fakeSMTP server window will show the email sent by the Email Formatter, as follows:
Double-clicking on the email in the Mails list tab will open the email in your default email client (in this case Mozilla Thunderbird), seen as follows:
Now, when trying to access the URL http://localhost:8080/users, users will be redirected to the login page as follows:
For the username, shazin can be used, while for password, the new password in the reset password email can be used. Then, this will successfully redirect to the URL http://localhost:8080/users and will show the correct response: