Making REST Calls Retryable in Biking Weather Suitability Forecast Application
One frustration I had noticed with my Biking Weather Suitability Forecast Application was that I found it often would not show results until I reloaded the page, and a look at the application logs showed that the REST calls to one of the APIs called had failed or timed out. After doing some research into using Spring's Retryable options for methods, I decided to make the DailyReportCollectionService method getCurrentDailyReports() retryable, so that it would be attempted a second time after a one second pause if the first try didn't succeed in returning complete data, with a third and final attempt made as the " Recover " option. First, I added the following two required dependencies to the dependencies section of the application's pom.xml file. <dependency> <groupId>org.springframework.retry</groupId> <artifactId>spring-retry</artifactId> </dependency> <dependency...