Using Environment object - Microservice configuration with Spring Boot [09]

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

КОМЕНТАРІ • 34

  • @reddibabu850
    @reddibabu850 4 роки тому +30

    Hi Kaushik sir, please add few courses to learn algorithms and DS. Your teaching skills are awesome.

    • @nipungarg1279
      @nipungarg1279 2 роки тому +1

      Try GeeksforGeeks, they have amazing content - let him focus on java only. He is our go to JAVA GOD !!

  • @venkatkodali5742
    @venkatkodali5742 3 роки тому +2

    you are improving so many techies lives, God Bless you sir.

  • @mohammadwaseemraza2550
    @mohammadwaseemraza2550 4 роки тому +1

    Using @PropertySources we can load properties mentioned in an external file. These properties are loaded into Environment. We can use Environment to access properties loaded from an external file. I found this use-case to use Environment a very useful.

  • @shemantsingh765
    @shemantsingh765 Рік тому

    best indian teacher on youtube

  • @yonosetampoco447
    @yonosetampoco447 4 роки тому +3

    I think that a correct use of environment is to check when diagnosing. If we receive unexpected values on properties. Then we can discover what is happening.

  • @markodjordjevic4471
    @markodjordjevic4471 3 роки тому

    Best teacher on Internet

  • @pintunag
    @pintunag 4 роки тому +4

    this is pure gold....

  • @ravindrakumar-jh7cu
    @ravindrakumar-jh7cu 2 роки тому

    @Java Brains: Please add more content on spring boot microservices like level 4 level 5 etc...

  • @praveenkumarkodge1892
    @praveenkumarkodge1892 2 роки тому

    Thank you for more specific information

  • @mohammedshabbirahmed976
    @mohammedshabbirahmed976 3 роки тому

    You are Awesome Bro You are A Hero You ROCK THE WORLD BRO YOU ARE SUPER AND THE BEST

  • @angelakarapetyan586
    @angelakarapetyan586 4 роки тому

    Why are you so smart? Thaaanks a lot,

  • @rashpalgill4530
    @rashpalgill4530 4 роки тому

    you can use Environment in order to validate if input profile is one of the valid allowed profiles.

  • @jishanair5621
    @jishanair5621 4 роки тому

    Thanks for providing ad free

  • @gauravmam
    @gauravmam 4 роки тому +2

    Hi Kaushik, The series is amazing. Thank you. I have a question, how do I take the the DB connection parameters as a rest API input from the user and connect to a that database , ideally that refreshes the DB connection at every API request without having to restart the spring application? Can I make use of the properties configuration somehow? How to do that along with spring data JPA repo?

    • @rshreyas17
      @rshreyas17 Рік тому

      Hi Gaurav. I was having the same question. Can you let me know if you found a way to do it?

  • @talkabu
    @talkabu 3 роки тому

    i think, we should like (or dislike) the video if we watch it.
    there are 32K views and only 600+ + 27 comments and responses. We should learn to appreciate the efforts.
    Also it will serve as a feedback as well...

  • @aneksingh4496
    @aneksingh4496 4 роки тому

    Hey Kaushik , how you get to know these Hidden gems of Spring Boot like Environment class :-), Please suggest

  • @manojkumarpadarthi4805
    @manojkumarpadarthi4805 3 роки тому

    Hi Sir Is Environment Object auto registered as bean in spring IOC container?

  • @aunghtayoo5439
    @aunghtayoo5439 3 місяці тому

    Thanks you.

  • @danepane527
    @danepane527 4 роки тому

    So is injecting a property vs using Environment.getProperty effectively the same thing or am I missing something?

  • @dowlathbashag65
    @dowlathbashag65 4 роки тому +1

    Kaushik , have an query ....how to communicate two services in micro service and if one service is not responding what is the behavior for other one...these two serveries are dependent each other.

    • @easwargaming7903
      @easwargaming7903 4 роки тому +1

      You could write a script in your server which monitors your service, and if your service fails it would trigger you a email or some kind of notification. That would help.

    • @Java.Brains
      @Java.Brains  4 роки тому +5

      Have you checked out the Level 1 course in this series? I cover microservice communication in depth. To answer your question, the way it works is using service discovery, and possibly running multiple instances of each service so that if one goes down, the request can be routed to another instance.

    • @dowlathbashag65
      @dowlathbashag65 4 роки тому +1

      @@Java.Brains Thanks a lot Kaushik, i have a chilly question ...instead of eureka server/client (for service discovery) what other options we have ...for using service discovery ( zookeeper, consul) if i am wrong correct me , and how to connect docker with microservices.

    • @Java.Brains
      @Java.Brains  4 роки тому +2

      Absolutely! Eureka isn’t the only solution. You can do any implementation that does the service discovery pattern. Learn the pattern in this video -
      ua-cam.com/video/GboiMJm6WlA/v-deo.html

  • @vinodhkumarummaneni9627
    @vinodhkumarummaneni9627 4 роки тому +1

    Good to know. Thank you 👍

  • @shaikhraifoddin36
    @shaikhraifoddin36 4 роки тому +1

    Not able to find spring cloud config server related video

  • @easwargaming7903
    @easwargaming7903 4 роки тому +1

    Kaushik, Is the Environment Controller exists in the spring inbuilt framerwork itself? Or do we need to have any dependency war?

  • @mayoorm909
    @mayoorm909 4 роки тому +2

    👌

  • @MultiMukesh1992
    @MultiMukesh1992 4 роки тому

    Kaushik, thanks for wonderful teaching. one question, if we combine all the profiles together and deploy the jar, let's say in dev, won't the dev server will have prod values as well , won't that be an issue?

  • @dineshshekhawat2021
    @dineshshekhawat2021 4 роки тому +1

    Title: Using environment object.
    Conclusion: You should not be using environment object.

    • @berjaoui92
      @berjaoui92 3 роки тому

      Well, i thought i went crazy... So we did understand the same thing... ☺