Spring Boot Microservice with Postgres Database Running in Docker Container Tutorial for Beginners
In this video, we will run postgres database in docker container and integrate Postgres database with a Spring Boot Microservice Application and perform different CRUD operations i.e. Create, Read, Update, and Delete operations on the Customer entity.
Spring Boot is built on the top of the spring and contains all the features of spring. And is becoming a favorite of developers these days because it’s a rapid production-ready environment that enables the developers to directly focus on the logic instead of struggling with the configuration and setup. Spring Boot is a microservice-based framework and making a production-ready application in it takes very little time.
PostgreSQL or Postgres is the most commonly used open-source relational database. It offers features like robustness, reliability, cost-free, etc. PostgreSQL serves as a data warehouse for multiple applications like web apps, mobile apps, etc. It enables us to store enormous and sophisticated data securely. Memento Design pattern defines three roles for objects. PostgreSQL is a powerful, open-source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
PostgreSQL is used as the primary data store or data warehouse for many web, mobile, geospatial, and analytics applications. PostgreSQL is a traditional RDBMS (relational database management system) SQL database, like Oracle and MySQL.
** Running Postgres database in Docker Container **
Containers offer easy app usage and scalability. Docker is a tool to create, deploy, and run applications using containers easily. A container is a standard unit of software that can be used to package applications and all the dependencies to a single package. These containers can be run on any server platform regardless of the underlying configuration or hardware structure. Docker can be used to run postgres database instances.
Docker image or containerization is the first step to take your application to cloud. The purpose of containerized application is to make sure your application is up and running always. Cloud platforms like AWS, AZURE or Google Cloud etc. provides container service to run docker image (containerized application). Containerization is a mechanism to minimized downtime of application and to automatically scale up or scale down as per our traffic conditions.
Benefits of containerized application is we can scale up or scale down the number of instances (pods) in few seconds. Containerized applications run in PODs (containers) that is virtualization of operating system running on physical servers. Cloud services like AWS, Azure, GCP etc. ensure that PODs are always running and automatically recover from error. If any POD (application container) goes down then container service brings it up automatically without impacting the user traffic and performance.
** Connect Postgres Database with PGAdmin or DBeaver Database tool **
1. Open pgadmin or Dbeaver database tool.
2. In the left pane, create a connection to database by providing database url, port, database name, username, password information.
3. Click connect to connect to database.
** TIMESTAMPS **
0:00 Welcome to Spring Boot Microservice with Postgres DB in Docker Container
0:40 Briefing about Tools
1:40 Architecture diagram
3:28 Download Postgres database Image from DockerHub
5:41 Running Postgres database in Docker Container & Port Mapping
8:06 Connect Dbeaver tool to Postgres database
10:28 Create schema table and insert data in table
12:53 Spring Boot Microservice Project Setup in Intellij
13:42 Creating pom controller business repository domain classes and configuration
20:27 Compile and Build Spring Boot Microservice application
21:04 Running Spring Boot Microservice Application
21:47 Testing GET endpoint using postman api tool
23:50 Testing POST endpoint using postman api tool
25:27 Summary of Video
#microservice #postgresdatabase #dockercontainer
** CodeOneDigest GitHub Repository **
https://github.com/codeonedigest/springboot-microservice-postgres-db
** Tools **
Download DBeaver tool https://dbeaver.io/download/
Download Intellij https://www.jetbrains.com/idea/download/
Download Postman https://www.postman.com/downloads/
DockerHub https://hub.docker.com/login
Spring Project Initializer: https://start.spring.io/
** CHECK OUT OUR OTHER VIDEOS **
Spring boot project setup: https://youtu.be/bsgA20eJKxs
Postgres Database Installation Setup and Configuration https://youtu.be/dcg6dxSx9o8
Prepare Docker file, Container and Build Image: https://youtu.be/g_pdTzjnuso
Deploy Docker Image AWS Elastic Container Service: https://youtu.be/ZlR5onuwZzw
** CHECK OUR PLAYLISTS **
Spring Boot Complete Tutorial https://youtube.com/playlist?list=PL2NZAYdLkYvg_VlNmszrb-Um0wRx5yGDF
Docker Containers Complete Tutorial
https://youtube.com/playlist?list=PL2NZAYdLkYvhZQo2VTVCSug_zVjekNodi
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Spring Boot Microservice with Postgres Database Running in Docker Container Tutorial for Beginners», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.