Good documenting of an API is essential for its acceptance, and Swagger is one of the most commonly used specifications when it comes to documenting RESTful services. SpringFox is an opensource project that makes it possible to create Swagger-based API documentation on the fly at runtime by inspecting Spring WebFlux and Swagger annotations. Textual descriptions of an API can be extracted from the annotations in the Java source code and be placed in a property file for ease of editing. SpringFox can be configured to bring in an embedded Swagger viewer to a microservice, which makes it very easy to read about APIs that have been exposed by the microservice and also try them out from the viewer.
Now, what about bringing some life to our microservices by adding persistence, that is, the capability to save data in a database? To do this, we need to...