Streamline Your Development: Spring Boot with PostgreSQL & pgAdmin in Docker

  Рет қаралды 8,089

Dan Vega

Dan Vega

Күн бұрын

Пікірлер: 25
@ArtJacob
@ArtJacob Жыл бұрын
Thank you so much! This video cleared up so many things for me! You're a great teacher!
@maheshbabu5400
@maheshbabu5400 Жыл бұрын
Your videos have been really helpful in understanding spring boot.
@DanVega
@DanVega Жыл бұрын
I appreciate that and I am glad I can help out.
@codecoder005
@codecoder005 Жыл бұрын
Hi Dan, Thanks for one more good video as always 😊. Can you please come with the changes to spring security in spring boot 3.1.1 ? When I upgraded my spring boot version from 3.0.8 to 3.1.1, the security filter chain bean giving me warning. http.csrf() is going to be deprecated and asking to use http.csrf(withDefaults()). http.headers(), http.sessionManagement() are also marked for depreciation and asking to go for withDefaults. What caused them to be marked for depreciation?
@mrowox
@mrowox Жыл бұрын
Nice tutorial. I cant remember the last time I used PGAdmin though. I use the built-in DB tool inside IntelliJ IDEA Ultimate Edition.
@_leftii
@_leftii Жыл бұрын
Same here. Super convenient
@AlienAndrew51
@AlienAndrew51 Жыл бұрын
Wish spring would do the same for podman. The ability to chose your container engine would be great.
@swipped99
@swipped99 10 ай бұрын
top quality tutorials!
@xCaleb
@xCaleb Жыл бұрын
Does Spring have any tools to automate (as much as possible) the process of making a multi-container deployment? For example, if you wanted to build your project into a jar and also run that in a Docker container? That specifically has been giving me issues for about a week now, in particular it seems it can’t talk to the database that’s running as part of my same compose file…?
@hayrullahyasar
@hayrullahyasar Жыл бұрын
I could not start pgAdmin image. pgAdmin desktop already installed in my computer so I thought port 5050 is already occupied. And lastly I changed the port ports 8888:80, than I can connect. Thank you for the video :)
@FrancoisLacoursiere
@FrancoisLacoursiere Жыл бұрын
Awesome video
@abhishekomprakash4074
@abhishekomprakash4074 4 ай бұрын
It is great that it works for you. i mean, you are able to verify that the table and record was indeed created in the db running in container. What will happen when you have posgres db installed on your local machine. in my case, i can see the ddl sql that the table got created but it gets created in the local postgres (not in the postgres inside the container) My compose file looks like: (container starts fine using docker compose up -d) services: postgres: image: postgres:16 container_name: postgres_con ports: - "5432:5432" environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: admin POSTGRES_DB: postgres Rest is defined in application.properties file. Why is the table not getting created in the db inside the container? spring.application.name=product-service #spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect spring.jpa.generate-ddl=true spring.jpa.hibernate.ddl-auto=create-drop spring.jpa.hibernate.show-sql=true spring.jpa.show-sql=true spring.datasource.url=jdbc:postgresql://localhost:5432/postgres #spring.datasource.url=jdbc:postgresql://postgres_con:5432/postgres spring.datasource.username=postgres spring.datasource.password=admin
@abhishekomprakash4074
@abhishekomprakash4074 4 ай бұрын
UPDATE: I tried my entire exercise on laptop without Postgres installed and this time, the table was created in the postgres db running inside docker container. I verified by connecting to the postgres instance via docker exec -it postgres_con psql -U postgres -d postgres \dt and select query. May be when Postgres is locally installed then the local installation is used by default. I wonder if there is a way to skip using the local instance and use the postgres in the docker container?
@mohamedahidesalahdine6285
@mohamedahidesalahdine6285 Жыл бұрын
Thanks Dan very useful tutorial but please can you make a video on the last repo that you used to auto connect on pgadmin.
@DanVega
@DanVega Жыл бұрын
That’s this one ☝🏻 At the end I talk about that setup
@jesper2455
@jesper2455 Жыл бұрын
Do you need both generate-ddl and ddl-auto properties or is the latter one enough?
@nidhalnaffati6440
@nidhalnaffati6440 Жыл бұрын
Great tutorial ❤
@saucekode9632
@saucekode9632 6 күн бұрын
Thanks!
@_leftii
@_leftii Жыл бұрын
High quality, useful video once again Dan! Question: Do you ever utilize the database tool in Intellij? Not as feature rich or pretty as pgAdmin, but super convenient when trying to stay in intellij.
@robbugh9217
@robbugh9217 Жыл бұрын
I downloaded the github project and tried running it. I get the following error: org.springframework.boot.docker.compose.core.DockerOutputParseException: Failed to parse docker JSON: I have docker installed and can manually run docker-compose on the compose.yaml file and the containers start. However, the app fails with the above error.
@robbugh9217
@robbugh9217 Жыл бұрын
OK, I figured out my problem. I had an older version of docker installed on my Linux system that did work with the Spring Boot Docker Compose plugin. I removed the old version of docker and replaced it with the latest Docker-Desktop version and now the project runs without errors.
@AndreaDiPietro-u1t
@AndreaDiPietro-u1t Жыл бұрын
Hi Dan, Thanks for the high-quality content that are you sharing with the community. Is Docker Compose Support suitable for leveraging multiple DBs: for example having entities repository for Domain APIs in a DB (Postgres), and spring batch feature's schema in a different DB (MySQL for instance)? When placing multiple DBs in my compose.yml file, SpringBoot spawns multiple ConnectionDetails beans but what's the right way to manage them? Parameter 1 of method dataSource in org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari required a single bean, but 2 were found: - jdbcConnectionDetailsForDemoDb1: defined in unknown location - jdbcConnectionDetailsForDemoDbBatch1: defined in unknown location A video with multiple DBs created by the Docker Compose integration would be awesome.
@javisartdesign
@javisartdesign Жыл бұрын
Great. There is no need to use the IP of the container, just use the service. Think in the scripts run in the pgadmin is using already the service name instead the ip
@victorojo
@victorojo 6 ай бұрын
yeah, this worked
@jopadjr
@jopadjr Жыл бұрын
50th...Thanks Dan
I Sent a Subscriber to Disneyland
0:27
MrBeast
Рет қаралды 104 МЛН
Война Семей - ВСЕ СЕРИИ, 1 сезон (серии 1-20)
7:40:31
Семейные Сериалы
Рет қаралды 1,6 МЛН
Почему Катар богатый? #shorts
0:45
Послезавтра
Рет қаралды 2 МЛН
How To Use Docker To Make Local Development A Breeze
21:53
ArjanCodes
Рет қаралды 329 М.
Docker Tutorial for Beginners
50:38
mCoding
Рет қаралды 88 М.
CIS-254 Oracle & SQL Server Database Containers
22:46
Jenny Kunkel
Рет қаралды 4
Docker Compose и Spring Boot 3.1
34:06
Уголок сельского джависта
Рет қаралды 13 М.
Docker Networking Tutorial, ALL Network Types explained!
19:46
Christian Lempa
Рет қаралды 209 М.
Spring Boot Testing - ** Batteries Included 🔋🔋
41:12
Dan Vega
Рет қаралды 25 М.
I Sent a Subscriber to Disneyland
0:27
MrBeast
Рет қаралды 104 МЛН