Тёмный

Spring Docker Compose Module - Connecting to the Container Database 

Dan Vega
Подписаться 62 тыс.
Просмотров 15 тыс.
50% 1

In this tutorial you will learn how to connect to the database that is running inside of the container when using the Spring Boot Docker Compose Module. This will be helpful if you want to use your database tools to connect to the running database.
🔗Resources & Links mentioned in this video:
Docker Compose Introduction: • 🔥 New in Spring Boot 3...
👋🏻Connect with me:
Website: www.danvega.dev
Twitter: / therealdanvega
Github: github.com/dan...
LinkedIn: / danvega
Newsletter: www.danvega.de...
SUBSCRIBE TO MY CHANNEL: bit.ly/2re4GH0 ❤️

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@toobprojects
@toobprojects 2 месяца назад
Brilliant stuff. Loving the Java 21 String Templates as well. Thanks for this tip! Awesome stuff indeed.
@WaldoRochow
@WaldoRochow Год назад
Wow! That must have been a frustrating learning experience. Thanks for saving us the grief.
@bart.kotula
@bart.kotula 8 месяцев назад
Awesome video! Thank you, Dan :)
@kaly7dev4873
@kaly7dev4873 Год назад
Thank you for your sharing Dan !
@odilhonislomov8954
@odilhonislomov8954 6 месяцев назад
Thanks a lot. Nice info. So does this mean: "when server is restarts containers will automatic restart"? It'll be wonderful if you give real working server example with docker-compose file.
@DanVega
@DanVega 6 месяцев назад
There is a property that will manage the lifecycle and the default is to start and stop the container when the spring application restarts. If you only wanted Spring to start the container and not shut it down each time you can change this behavior spring.docker.compose.lifecycle-management=start_and_stop
@gasparcalix2095
@gasparcalix2095 Год назад
that was grate, didnt know sprint has docker support, i would try it on my next projeet!
@elliothuntington8980
@elliothuntington8980 Год назад
I would love to see you make a video on configuring a reactive CRUD application using Java 21, HashiCorp Vault, Liquibase, and R2DBC, all services configured and running inside a docker compose.
@praveens2272
@praveens2272 Год назад
I was doing it just blindly 5432:5432, now i know the reason
@ayed-al-nator
@ayed-al-nator Год назад
I love your content ❤
@kensaitakeso
@kensaitakeso Год назад
thanks Dan. it is curious that Gradle still doesn't support all features of JAva 21 so maven is best option for experiments
@pedro_alonso
@pedro_alonso Год назад
Awesome!
@ylioo
@ylioo Год назад
is there any way we can use this for testing as well, because I think the spring boot team had disabled it for testing
@xCaleb
@xCaleb Год назад
Adding the ":5432" part to the ports section in my docker-compose file actually breaks my app...
@DanVega
@DanVega Год назад
Try docker ps -a to get the container id and then running docker inspect on it and inspecting the port bindings. Maybe try deleting the container all together and starting over
@avalagum7957
@avalagum7957 Год назад
Ah, that's the issue. `docker container ls` will show you what port on the host is mapped to the port in the container.
@idouxda
@idouxda Год назад
In my Docker Compose for Postgress that I'm using for Keycloak to secure my Microservices, I have this: ports: - "5432:5432"
@lukasleuenberger7821
@lukasleuenberger7821 Год назад
Shouldn't the database be 'spring-blog' at 4:45?
@ajinkyakhete1151
@ajinkyakhete1151 Год назад
Can Anyone explain what happened ?
@agusp1951
@agusp1951 Год назад
Thanks sir. Don't use dark mode in youtube, please!
@lorathbane
@lorathbane Год назад
sure, go light, who doesn't like getting flashbanged, I guess we could just watch in sunglasses😎
Далее
НЮША РОЖАЕТ?
00:17
Просмотров 858 тыс.
Docker-compose tutorial
19:45
Просмотров 68 тыс.
Intro to Docker [with Java Examples]
21:17
Просмотров 70 тыс.
Spring Boot Testing - ** Batteries Included 🔋🔋
41:12
5 Common Mistakes Spring Developers Make
18:06
Просмотров 19 тыс.
How to Run MongoDB in Docker
11:44
Просмотров 19 тыс.
Microservices with Databases can be challenging...
20:52