Spring Boot Docker Compose Support : Local Development Made Simple

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 8

  • @bohdanchupika9237
    @bohdanchupika9237 2 месяца назад

    Awesome! Good job, man!

  • @PushpendraKushvaha
    @PushpendraKushvaha Месяц назад

    2:00 When I google the term true then I came to know it means
    true controls transitive inclusion for downstream projects, not packaging.

    • @sivalabs
      @sivalabs  Месяц назад

      true has multiple purposes. One, as you said if you don't want to include a jar as a transitive dependency you can set it as optional. Second, if you use some jar only for local development such as lombok, spring-boot-docker-compose and you don't need them to be packaged in the final fat-jar.
      From official docs: maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
      "Optional dependencies save space and memory. They prevent problematic jars that violate a license agreement or cause classpath issues from being bundled into a WAR, EAR, fat jar, or the like."
      In our case, we are using optional=true so that we make use of them only for development and not to package in the final artifact.

  • @nasamind
    @nasamind 3 месяца назад

    Awesome

  • @TheDummyHead
    @TheDummyHead 8 месяцев назад

    Thanks for the video!

  • @DavidSoles
    @DavidSoles 8 месяцев назад

    great video ... thanks 👍

  • @surya2557
    @surya2557 Месяц назад

    sir while interacting with database it need to create datasource object it reads the necessary properties from application.propreties (autoconfiguration and bulk injection) right in the first demo the properties are there in compose.yaml file so from compose.yaml how it will read ?

    • @sivalabs
      @sivalabs  Месяц назад +1

      While using Spring Boot docker compose support for database, Spring Boot will ignore the properties configured in application.properties file and use POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB env variable values configured in compose.yaml file.
      I have demonstrated this here ruclips.net/video/fTcyyxs3ZXI/видео.htmlsi=cEXXle4ibeuQn1Yg&t=588