Showing posts from September, 2021

Developing Spring Boot Application using Docker - Part 3

Introduction  Now that we are able to run and Debug the application inside the container let us add Database connection for our service. In this part we will be adding Database service to our Docker Compose file and use that inside the application. For the purposes of simplicity we can use MYSQL as backend database. Get started to build CRUD using Spring Boot To begin with let us add the below to our gradle file to get the required support for our DB We can now define our data model to be added. It is time to create our CRUD repository Lets add our own Service that can be used by the REST Controller Lets add our own Rest Service that can be invoked to access our database With the above code, we should have something to get into our Docker friend. Get your docker stuff ready Let us now add the database for us to test the docker compose This docker compose file has inline comments help you understand what is happening here If you pay close attention to what has be