Spring Boot Docker Compose Support : Local Development Made Simple

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 8

  • @bohdanchupika9237
    @bohdanchupika9237 Місяць тому

    Awesome! Good job, man!

  • @nasamind
    @nasamind 2 місяці тому

    Awesome

  • @TheDummyHead
    @TheDummyHead 7 місяців тому

    Thanks for the video!

  • @PushpendraKushvaha
    @PushpendraKushvaha 16 днів тому

    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  16 днів тому

      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.

  • @DavidSoles
    @DavidSoles 7 місяців тому

    great video ... thanks 👍

  • @surya2557
    @surya2557 9 днів тому

    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  9 днів тому +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 ua-cam.com/video/fTcyyxs3ZXI/v-deo.htmlsi=cEXXle4ibeuQn1Yg&t=588