We will now build a Spring Boot application that will run every five seconds and output a random fortune. Let's call this application fortune-teller.
This application is a Spring Boot (https://spring.io/guides/gs/spring-boot/) application. You can use the IDE of your choice for this exercise.
We will begin by creating a class called FortuneCookieGenerator.java. This class will be responsible for generating random fortunes using the words list. The length of the fortune will be limited by the fortuneLength attribute. The contents of the FortuneCookieGenerator.java are as follows: