I am testing the creation of a REST API using swagger – generated the server stub for spring boot based on the petstore available on editor.swagger.io.
The generated model does represent my database table – it’s a simple table with some fields. I’ve created one entry to add records, one to update and another to delete.
Right now I do have an API, but as far as I know, it doesn’t connect to a real database.
Can someone provide a simple tutorial, a step by step or some sort of guide to help me out on how to use this kind of server stub (generated in swagger) to connect to a real mysql database?
After reading and testing, it seems that adding the mysql properties to the application.properties file did the trick.