🔥 New in Spring Boot 3.1 - Spring Boot Docker Compose Module

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024
  • In this tutorial you will get your first look at Spring Boot 3.1. There are some really great features in this release including the Spring Boot Docker Compose module. This module will start/stop your containers for you that are declared in a Docker Compose file.
    🔗Resources & Links mentioned in this video:
    GitHub Repo: github.com/dan...
    Spring Boot 3.1 RC 1 Release Notes: github.com/spr...
    👋🏻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 ❤️

ความคิดเห็น • 84

  • @damoimyers2651
    @damoimyers2651 ปีที่แล้ว +9

    I've started my Spring journey about a week now and this is definitely something great from the Spring Team. Thank you Dan for explaining how it works. Your tutorials are always simple and easy to follow. 😎

    • @andiuptown1711
      @andiuptown1711 5 หลายเดือนก่อน

      How’s the Spring journey now ?

    • @damoimyers2651
      @damoimyers2651 5 หลายเดือนก่อน

      @@andiuptown1711 I'm now integrating spring boot with Java Swing projects, building out web apps etc. Spring Boot is simply amazing.

    • @damoimyers2651
      @damoimyers2651 5 หลายเดือนก่อน

      @@andiuptown1711 I love it! I'm now able to build stand-alone applications with ease. Integrating Sring Boot with Java Swing is just fun. Also, I'm now able to build out wep apps way quicker and easier than when I was learning Python Django. Spring Boot is simply amazing bro.

  • @LukeGJPotter
    @LukeGJPotter ปีที่แล้ว +7

    It looks cool.
    May I suggest a video tutorial? On your "Spring to Production" series, where you use this 3.1RC Docker Compose with a Dockerfile and Deploy on Render?

  • @ShadowVipers
    @ShadowVipers ปีที่แล้ว +1

    Wow this couldn't be better timed, I'm actually working on deploying my spring boot application this week.

  • @Rostik_13
    @Rostik_13 ปีที่แล้ว +1

    Thank you, dude, for introducing me to the new chips. In our craft, it is vital to keep up with the times👊

  • @TwobooT
    @TwobooT ปีที่แล้ว +1

    Super Cool Feature!!! And a Solid Explanation about it!! Thanks

  • @rafaelacioly3252
    @rafaelacioly3252 ปีที่แล้ว +3

    Sweet!
    I wonder if there will be an extension to configure other dependencies such as RabbitMQ, Redis, Kafka etc...

    • @degolojan9475
      @degolojan9475 11 หลายเดือนก่อน

      Yes they are there

  • @vishalmatam
    @vishalmatam ปีที่แล้ว +1

    Awesome feature! Thanks Dan for the video!

  • @jeroenadamdevenijn4067
    @jeroenadamdevenijn4067 ปีที่แล้ว +1

    So for production, assure the passwords as env. variables, then on dev machine, push your project to a container repository eg. using Maven Jib plugin. Finally, on production server pull your container. Spring Boot Docker Compose Module will assure db will be spun up. Something like I described here?

  • @birbir969
    @birbir969 ปีที่แล้ว +1

    Thank you very very much. Happy coding!!

  • @Jhonfreddy15
    @Jhonfreddy15 ปีที่แล้ว +1

    Finally!!! 🙌🏽🙌🏽🙌🏽

  • @stivenmedina2825
    @stivenmedina2825 7 หลายเดือนก่อน +1

    Thank you so much for this kind of content, very useful

    • @DanVega
      @DanVega  7 หลายเดือนก่อน

      My pleasure!

  • @marianojm5675
    @marianojm5675 ปีที่แล้ว

    Hi Dan, thanks for your videos, they are always great, maybe you could explain a bit what docker-compose is and how to set it up. Something a little more explained like for someone who just started with microservices and docker. Thank you!!

  • @ProMinecraftSprite
    @ProMinecraftSprite ปีที่แล้ว +1

    amazing thing cant wait to use it

  • @sagarbhat3884
    @sagarbhat3884 ปีที่แล้ว +3

    Great video as usual Dan. I was not aware of this amazing feature with Spring Boot 3.1.0 RC1. Thanks for talking about this. Btw, just wanted to let you know that your Github Repo link for this demo is not working (getting a Page not found error).

    • @DanVega
      @DanVega  ปีที่แล้ว +1

      Thank you for the heads up. The repo was private, I have fixed it.

  • @musanzawanga2083
    @musanzawanga2083 2 หลายเดือนก่อน

    Thank you very much!!! This was so valuable🤞🏽

  • @AndrulisTravel
    @AndrulisTravel 4 หลายเดือนก่อน

    Nice! One thing, what are the additional steps, when you wanna deploy this app to some service (heroku, railway). We still need some configuration in application properties to get DB connection credentials from environment variables.

  • @NickY_Msk
    @NickY_Msk ปีที่แล้ว

    Thank you for your video ! It’s really cool feature 👍🏻

  • @mihirsawant8817
    @mihirsawant8817 ปีที่แล้ว

    It's really awesome 🔥
    I tried doing it with mongo image and it's working perfectly

  • @dias6475
    @dias6475 ปีที่แล้ว

    Awesome. Thank you Dan!

  • @AllDetailsIKnow
    @AllDetailsIKnow ปีที่แล้ว

    Great video Dan. Thanks so much

  • @poklakni
    @poklakni ปีที่แล้ว +1

    What is the use case for using this in production?

  • @AntonioCabralNumberOne
    @AntonioCabralNumberOne 6 หลายเดือนก่อน

    This is really great, but how to use this module to dockerize the spring boot project itself?

  • @MrSurprise777
    @MrSurprise777 8 หลายเดือนก่อน

    Awesome. Very helpful.
    Is it possible to pick up the compose only for specific profile ?

  • @otaviofriedein
    @otaviofriedein 4 หลายเดือนก่อน

    Muito obrigado! Ajudou demais

  • @thiagopereira9961
    @thiagopereira9961 หลายเดือนก่อน

    Hi Dan, thanks for the explanation, I have a question. How do I set compose.yaml in case I have 2 different profiles, such as a prod using compose with PostgreSQL and a dev using h2 or any other database?

  • @mensahtribeadventures2630
    @mensahtribeadventures2630 9 หลายเดือนก่อน

    Thank you this was fun

  • @alessandrobx5850
    @alessandrobx5850 ปีที่แล้ว

    Awesome features

  • @hamidreza8354
    @hamidreza8354 ปีที่แล้ว

    my fav channel

  • @pmorah
    @pmorah ปีที่แล้ว +2

    Just out of curiosity. Are you able to see your container running on your computer while your app is up and running?
    Thanks

    • @DanVega
      @DanVega  ปีที่แล้ว +2

      Yes! Open up Docker Desktop or run docker ps from the command line and you will see it.

    • @pmorah
      @pmorah ปีที่แล้ว

      @@DanVega cool. Thanks dan

  • @colincampbell8418
    @colincampbell8418 ปีที่แล้ว

    Wow this is game changing! Do you know if it's possible to configure docker-compose on profiles active? Trying to use this only for dev profile.
    Cheers!

  • @Apopjak
    @Apopjak ปีที่แล้ว

    this is soo cool!

  • @goodvideobro
    @goodvideobro 6 หลายเดือนก่อน

    super content

  • @JohnTriantafillakis
    @JohnTriantafillakis ปีที่แล้ว

    Cool in development, how about in prod? :P

  • @wagnerfaria1601
    @wagnerfaria1601 ปีที่แล้ว

    AWESOME @@

  • @user-ql5mw8pv7d
    @user-ql5mw8pv7d ปีที่แล้ว

    Thanks, great demo! But what about multi module application?
    Let's say we have 2 modules CustomerModule and ProductModule in our project, will they recognize docker-compose file in project root folder?

  • @user-lm1xp1wf3k
    @user-lm1xp1wf3k ปีที่แล้ว

    Thank you this video

  • @tassneemaltaf2001
    @tassneemaltaf2001 10 หลายเดือนก่อน

    Subscribed!!!

  • @sakthinivas1840
    @sakthinivas1840 9 หลายเดือนก่อน

    Hi Dan, we don't need to specify "driver-class-name" property as well in the Docker compose file? which we usually do in application.yml

  • @TheGuroguro12
    @TheGuroguro12 ปีที่แล้ว

    Thank you for a video, i think record can be used with jpa

  • @miguelhernandezzarasua3986
    @miguelhernandezzarasua3986 ปีที่แล้ว +1

    Thanks for the tutorial Dan, I was able to implement it into one of my personal projects, however now I am working on adding unit tests and it seems like the docker compose does not run with contextLoads, I tried manually adding the url, user and password but I am facing some challenges.

    • @miguelhernandezzarasua3986
      @miguelhernandezzarasua3986 ปีที่แล้ว

      After few tests, I figured that this does not work for junit out of the box, so I just created an application.yml inside of the resources directory in test with the properties to connect to the database (including the database dialect) and that solved my problem, awesome feature, thanks Dan for the vid

    • @mensahtribeadventures2630
      @mensahtribeadventures2630 9 หลายเดือนก่อน

      i initialized a db first this problem went away

  • @petroniobonavides3530
    @petroniobonavides3530 ปีที่แล้ว

    Why dont U use Lombok? Do U think limbok is not a good option?

  • @samsularipin9097
    @samsularipin9097 2 หลายเดือนก่อน

    should i install jdk local host or it's already managed by docker ?

  • @DreamingWithEyesWide
    @DreamingWithEyesWide ปีที่แล้ว

    Great video as always! Quick question- how are you getting all the code auto-generated for you in IntelliJ, without explicitly adding it yourself, like the getters and setters added to the model class? Is there an extension/command in IntelliJ for this?

    • @DreamingWithEyesWide
      @DreamingWithEyesWide ปีที่แล้ว

      Sorry, I didn't watch the whole video before I asked the question. You answered it later on where you said it's intellisense from IntelliJ.

  • @void_star_void
    @void_star_void ปีที่แล้ว +1

    Can you give me hints why you choose Integer type for id considering it cannot be null as a PK? Am I missing something here😅

    • @DanVega
      @DanVega  ปีที่แล้ว

      With a generated value not much but I always use wrapper types for my id's. If you take the generated value off of there and create a new post you will insert a record with a value of 0 on the first try.

    • @DanVega
      @DanVega  ปีที่แล้ว

      Great question though 👏🏻

  • @ylioo
    @ylioo ปีที่แล้ว

    is there any way I can use it for test.
    Like this it works for normal use.

  • @chrispie5
    @chrispie5 ปีที่แล้ว

    Is there a way to get the logging of the containers printed to application logs like with testcontainers?

  • @arkadiuszgalus6308
    @arkadiuszgalus6308 ปีที่แล้ว +1

    HI thank you for tutorial I followed your steps but I receive error like > .PSQLException: FATAL: password authentication failed for user "postgres" and Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to determine Dialect without JDBC metadata (please set 'javax.persistence.jdbc.url', 'hibernate.connection.url', or 'hibernate.dialect') In your application properties there is nothing about dialect do you have any idea how can I fix it? it is related perhaps to intelidj version ? Thank you in advance for response

    • @alegutierrezmusic
      @alegutierrezmusic ปีที่แล้ว +1

      In my case the error was caused because I got installed Windows Postgres usign the same port, so change the ports from "5432:5432" to "9091:5432" for example

    • @arkadiuszgalus6308
      @arkadiuszgalus6308 ปีที่แล้ว

      I will try tkank you😊

  • @khojiakbarabierov8462
    @khojiakbarabierov8462 ปีที่แล้ว

    Hi Dan Vega , Why i get this error when run your code
    org.springframework.boot.docker.compose.core.ProcessExitException: 'docker context ls --format={{ json . }}' failed with exit code 1.
    Stdout:
    Stderr:
    unexpected end of JSON input
    I also run docker

  • @codingapi8073
    @codingapi8073 ปีที่แล้ว

    how connect remote docker compose ?

  • @vadimsokolov6058
    @vadimsokolov6058 6 หลายเดือนก่อน

    Doesn't work:
    Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' for common cases or 'hibernate.dialect' when a custom Dialect implementation must be provided)

  • @wagnerfaria1601
    @wagnerfaria1601 ปีที่แล้ว

    Can you set a docker-compose for each application profile?

  • @vicariousgreek5711
    @vicariousgreek5711 ปีที่แล้ว

    I know this may not be so related to the feature presented but… has anyone succeeded running Oracle (oracle-xe) with docker or docker compose on Apple silicon macs? 😢

  • @punekarinwinnipeg214
    @punekarinwinnipeg214 ปีที่แล้ว

    Hello sir, Can you please enlighten me, with how can I start contributing to an open source java projects. Steps I should take to understand the code and to contribute to it. My background is : I am doing my bachelors degree in computer science currently in my 2nd year and I am learning java from last 3 years. Can you please help me out ?
    Mainly, How and from where can I start understanding the code?

  • @alejandromartinezramirez3312
    @alejandromartinezramirez3312 ปีที่แล้ว

    Hi Sr. Do you have a course of spring boot from scratch in Udemy?

  • @dariuszchmiea3567
    @dariuszchmiea3567 ปีที่แล้ว

    Docker is not free for commercial use. Planty of conpanies drop it.

  • @Trodix89
    @Trodix89 ปีที่แล้ว +1

    Hi, good feature !
    But, everytime I reboot my application, all my docker containers will be recreated ?
    Also, Is it possible to do a video on Spring Security ACL with Domain Object Security ?
    Thank's !

    • @DanVega
      @DanVega  ปีที่แล้ว +1

      No it will just stop it and the restart it next time. I don't have much experience with Spring ACL but I will add it to my backlog to do some research.

    • @Trodix89
      @Trodix89 ปีที่แล้ว

      @@DanVega Thank's

  • @shubhamgoel223
    @shubhamgoel223 ปีที่แล้ว

    how do we disable this for prod deployments?

    • @DanVega
      @DanVega  ปีที่แล้ว +1

      You can set spring.docker.compose.enabled=false in your production properties

    • @shubhamgoel223
      @shubhamgoel223 ปีที่แล้ว

      @@DanVega thanks

  • @BrijeshPatelEngineer
    @BrijeshPatelEngineer ปีที่แล้ว +1

    Why dont you just use lombok to generate all the getters and setters for model package… do you see any inefficiencies init? @danvega

  • @n_indian_girl5966
    @n_indian_girl5966 9 หลายเดือนก่อน

    while running the application after creating docker-compose.yml getting error Cannot invoke "org.springframework.boot.docker.compose.core.DockerCliInspectResponse.hostConfig()" because "inspectResponse" is null.

    • @vimaljames6440
      @vimaljames6440 4 หลายเดือนก่อน

      I also have this issue :(

  • @basicbeaver
    @basicbeaver 4 หลายเดือนก่อน

    Do we refrain from pushing the docker compose file to GitHub since there is sensitive data like password? Or can we pull in those values from our properties file instead and then push docker compose to remote?

  • @jinghong2494
    @jinghong2494 ปีที่แล้ว

    you really save my life!!!🥲