Spring Cloud Config Server with Example in a Spring Boot App | Tech Primers

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ม.ค. 2025

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

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

    Great explanation and easily understandable. Like BGM playing when explaining.

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

    Hi Bro..I am really thankful to you as I have started spring cloud, microservices and spring boot with your videos... I learned spring cloud basics just because of u..Got confidence to build microservices...Thanks alot..

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

    one of the crisp and clear demo I ever heard on any particular topic. Thanks a lot. Just wanted to mention that when I wanted to refresh client, it does not work with localhost:8080/refresh. Instead, It worked with localhost:8080/actuator/refresh. I am beginner in actuators so don't know why it worked like that.

  • @srikanthb4387
    @srikanthb4387 5 ปีที่แล้ว +4

    GREAT EXPLANATION AND EASILY UNDERSTANDABLE, I really like your videos very much,
    Back ground music is really disturbing sometimes it is dominating your voice, PLEASE take care of BGM, one or two people may like it but not all.

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

    It was a clear video! Thank you! could you please reduce the volume of the BGM or you dont even need that sound, little disturbing! You are doing great man, keep it up! Thank you again!

    • @TechPrimers
      @TechPrimers  7 ปีที่แล้ว

      +kaipulla77 sure. Thanks dude

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

    Good tutorial. Good explanation and demo of the architecture, usage of spring-cloud annotations and the code. Thank you.

  • @lokeshkumarrathinave4645
    @lokeshkumarrathinave4645 6 ปีที่แล้ว

    Cool dude.. Its pretty simple and well explained for beginners. first time seeing your tutorial and impressed.

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

    Excellent! Many thanks
    Please don't mix background music, its really distracting.. all the videos are really good. But please take care of this.

  • @JameS00989
    @JameS00989 3 ปีที่แล้ว

    Amazing cleared my concept thanks 🙏

  • @mohkharma
    @mohkharma 6 ปีที่แล้ว +14

    excellent explanation! many thanks
    Please mute the background music :)

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

    Excellent awesome. This should be sufficient enough to work on similar project

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

    The BGM is really refreshing, there is no other youtube channel which offers tech content with BGM, subscribed for that!!!
    Please do not remove it..
    Very good explanation on cloud config. Have started seeing your other videos too. Well done Man!!!
    A query on spring cloud config - High availability. Is it possible to have more than one instance of spring cloud config up and running, referring to a single repository. This is for high availability, even if one is down, other would still be functional..

    • @TechPrimers
      @TechPrimers  5 ปีที่แล้ว

      Yes you can configure another instance

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

    Great videos and clear explanation. Thanks a ton, it helped me a lot.

    • @TechPrimers
      @TechPrimers  7 ปีที่แล้ว

      +Krishnaraj Sooji my pleasure Krishnaraj. Glad that was helpful

  • @ratneshchouhan6
    @ratneshchouhan6 3 ปีที่แล้ว

    @TechPrimers When I'm sending POST request using Postman I'm getting 404 any idea ?
    {
    "timestamp": "2021-05-17T23:10:03.950+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "No message available",
    "path": "/refresh"
    }
    Actuator is available in pom.xm.

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

    Excellent presentation. Great learning

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

    Thanks for the amazing content.
    I have some of the legacy java servlets based apps without spring architecture but require to use single place for their configs. How we can use similar approach in those apps? Or How we can make them config client to interact with config server?

  • @pankajkumar-ui3oi
    @pankajkumar-ui3oi 6 ปีที่แล้ว +1

    clear explanation in simplicity

  • @cpsarathe
    @cpsarathe 5 ปีที่แล้ว

    Precisely Great. Nice Music

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

    simple and clear, thanks for the video.. :)

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

    very clear, thank you.

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

    Nicely Explained , Thank you

  • @kashif3720
    @kashif3720 6 ปีที่แล้ว

    Great effort! Just one concern, what 8f I would have to configure multiple properties like client.properties, db.properties etc

  • @rahotmanp5212
    @rahotmanp5212 3 ปีที่แล้ว

    Good Explanation, how do we differentiate with different profiles like DEV, Integration, Certification and Production

  • @VRRM
    @VRRM 6 ปีที่แล้ว

    Can you do a video on Oauth 2 with angular front end with two are pages navigation to propagate the token to services?

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

    Another great work by you. Can you also cover these question please.
    What happen when (1) you have multiple config server, (2) we are using github instead of local git and (3) multiple user can update that config. How changes from github server reach to different config server running parallel on different VM's.
    How does all micro service get latest version of config in your example you have only one micro service but in real world we can have multiple instance of same or different micro services running parallel hitting refresh URL manual is not good option. How does we know IP and port because micro-service come and go based on different KPIs.

  • @lavanyav8748
    @lavanyav8748 5 ปีที่แล้ว +8

    BGM is very disturbing, kindly avoid. Good explanations and we would like to get benefitted from your videos.

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

    Awesome ❤️❤️❤️❤️🔥

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

    Thank you so much.. So nice of you.... God bless.... Great work... :) :) :)

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

      my pleasure Fairoz

  • @murari-goswami
    @murari-goswami 6 ปีที่แล้ว +15

    Please do not play background music, sometime annoying a lot. Thanks for the demo though

  • @dowlathbashag65
    @dowlathbashag65 4 ปีที่แล้ว

    Hi Vijay, have an query regarding git repo and refresh scope ...please correct me how in production it will work...if i made some changes in property file , as per @RefreshScope annotation , need to run the url ( ie refresh url ) in postman then it will reflected in Browser. or it will work in production env. Pls suggest / inputs needed for this scenario. Thanks in advance for your explanation.

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

    Please remove the BGM that's distracting the concentration . Your videos are really useful thank you

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

    Simple , informative and effective , Love ur all tutorials !!! Can you tell me how you opened two projects in separate window in intellijIdea

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      thats the default setting option, you can enable it back to ask everytime you open new project. check setting window and search for opening projects in new window

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

    Great Explanation!!!!!

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

    enjoyed the cloud knowledge with music.. Thanks

  • @parthapratimbaral4310
    @parthapratimbaral4310 2 ปีที่แล้ว

    Can you create a sample with same but configuration should fetch from database

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

    Thanks for sharing. Very informative! Can u share a video on zookeeper also?

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

    very nice video and explanation.just one concern last step "localhost:8981/refresh" is not refreshing.i am using spring boot 2.2.2.any idea??

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

    Very good explanation. Thank you!!
    I have a couple of questions.
    1. how can I change the property values for the beans which are in @Configuration class ? (for eg: any db config )
    2. Can't we automate the /refresh endpoint, instead of doing post request every time?

    • @TechPrimers
      @TechPrimers  7 ปีที่แล้ว

      +Chandan Bharadwaj
      1. You can just inject the @Bean with connection factory and inject properties and override in the connection factory. You can example in the internet.
      2. If we add refresh in regular intervals, it's not efficiently used. The refresh can be used only when the properties got changed. Most of the time property change is not going to happen very often. So it makes sense to do the refresh only when required

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

    well explained thank you

    • @TechPrimers
      @TechPrimers  7 ปีที่แล้ว

      +vanitha basavanna thanks Vanitha. Glad that was useful

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

    Good explanation but please avoid background music it's very disturbing

  • @MohaideenA
    @MohaideenA 6 ปีที่แล้ว

    QQ:- localhost:8084/actuator/refresh is not working when I enabled Spring security , getting a 403 error , this same case happened when I access h2-console enabling spring security.
    Any work around ?

  • @at3655
    @at3655 4 ปีที่แล้ว

    Hi I want to do poc on spring cloud config server using docker?? Please can you help me about this

  • @theniteshkumarjain
    @theniteshkumarjain 6 ปีที่แล้ว

    Nice and simple explanation. But I have a doubt. Say my microservice is deployed in aws with multiple instances. Will the refresh url refresh the changes in all instances?

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

    Hey, your videos are great , can you create a video about PCF and how to deploy microservices in PCF.

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      Not sure if you already saw it. Its already there - th-cam.com/video/hzWEw--OziQ/w-d-xo.html

  • @ILyaCyclone
    @ILyaCyclone 6 ปีที่แล้ว

    Hello Tech Primers! Could you make config-server available on github? It is not available at the moment.

  • @akshaysachdeva6401
    @akshaysachdeva6401 5 ปีที่แล้ว

    Hi great video, i am trying to deploy the server and client on kubernetes and i want to use the configs from github only and not use config maps or secrets of kubernetes and neither use spring cloud kubernetes . Is there a way to do that??

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

    Very useful

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

    A great video tech primer team. I have a question, in case I have a microservices with a lot of instances the refresh method is some tedious. Is there any way to solved that problem? Thanks

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      the /refresh needs to be done only when there is a config change and that need not be done on a daily basis. If thats done regularly, you need to opt for a different approach. But ingeneral there is no better way as of now.

    • @sanjaykantheti4002
      @sanjaykantheti4002 6 ปีที่แล้ว

      when we have config changes in multiple microservices and need to apply refresh then we can use Spring cloud Bus. :)

  • @LivenLove
    @LivenLove 6 ปีที่แล้ว

    spring cloud server code is not present in the git repo, can u please add it?

  • @VikashSingh-gq9dd
    @VikashSingh-gq9dd 4 ปีที่แล้ว

    How client knows there is change is git repository and call refresh ?

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

    nicely explained.

    • @TechPrimers
      @TechPrimers  7 ปีที่แล้ว

      Thanks Arun. Glad that was helpful

  • @rajanivardhireddy177
    @rajanivardhireddy177 5 ปีที่แล้ว

    How you can maintain different versions of config server for same app with different version?

  • @JourneyBliss-ks15
    @JourneyBliss-ks15 ปีที่แล้ว

    War your using server configuration right?

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

    can we get secrets and config maps from git repo to config client ?? through cofig server ??? pls explain me that Sir

    • @TechPrimers
      @TechPrimers  4 ปีที่แล้ว

      Secrets should never be stored in Repository. They should be stored in Vault and retrieved from the vault when required.
      Config maps with config server solution is not available right out of the box, but you can have a side car perform the job of config server and load into config maps

  • @sss67447
    @sss67447 7 ปีที่แล้ว

    nice explanation,could u do a video on how to handle transaction in micro services based architecture applications

    • @TechPrimers
      @TechPrimers  7 ปีที่แล้ว

      sure Sam. i will do that soon.

  • @28kverma
    @28kverma 7 ปีที่แล้ว +2

    Can you please upload code for config server; it is not available in the github location mentioned above.

    • @TechPrimers
      @TechPrimers  7 ปีที่แล้ว

      you can check out the project - github.com/TechPrimers/spring-boot-config-server-example

    • @shdigaja
      @shdigaja 6 ปีที่แล้ว

      There is no code under config-server at that link

  • @virtexamit
    @virtexamit 6 ปีที่แล้ว

    We do configure our Microservice with discovery server. Is it possible to update our Microservice configure with new discovery server location or adding another one more for balancing load?

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      to make your additional discover service seamless to other microservice, you can do via load balancing. Else if you want to have separate group of services then you can have them separately.

  • @kashif3720
    @kashif3720 6 ปีที่แล้ว

    can we write config client and server in same boot application?

  • @amirchoubani5001
    @amirchoubani5001 6 ปีที่แล้ว

    I think the config server folder in github does not exist any more.

  • @premierde
    @premierde 7 ปีที่แล้ว

    The spring-boot client does not work it won't fetch the properties, if you remove spring-web dependency. Change ur client to jms client and not a Rest client. (Spring-boot jms client does not need spring-web). Can you try with jms client?

  • @MohaideenA
    @MohaideenA 6 ปีที่แล้ว +4

    Including this comment for those who are using new version , the refresh URL /refresh will not work in new version, you should use /actuator/refresh and With Spring Boot 2.0.*, actuator endpoints must be 1) enabled and 2) exposed.
    By default, all endpoints but shutdown are enabled and only health and info are exposed.
    In this case, the following should work:
    management.endpoints.web.expose=refresh
    stackoverflow.com/questions/48900892/how-to-enable-all-endpoints-in-actuator-spring-boot-2-0-0-rc1

  • @ramakrishnapvs1624
    @ramakrishnapvs1624 6 ปีที่แล้ว

    i have a main application with spring boot 2 application with angular 1. can i use config server in same application by adding git details in application.properties? or do i need to create a seperate application for that

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      If the properties are in a separate app, its easier to track versions. If you have it in the same repo, then tacking the version of your app + your properties will be difficult

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

    Excellent Demo but the music in background was annoying... you may reduce it to very low or remove it.... because we concentrate on your words and demo then music....

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

    Fantastic tutorial.... Can you please get rid of the background music.....pl pl pl

  • @hkmehandiratta
    @hkmehandiratta 2 ปีที่แล้ว

    code-server code missing from Github. Thanks for Tutorial though. Good job.

  • @balamurugansethuram701
    @balamurugansethuram701 6 ปีที่แล้ว

    /refresh is not working. Not sure of the reason.

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

    You don't need to restart the client. That's the point right?

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

    well explained

    • @TechPrimers
      @TechPrimers  7 ปีที่แล้ว

      thanks vanitha. Glad that was useful

  • @rohitbuddabathina
    @rohitbuddabathina 5 ปีที่แล้ว

    For datasource properties it's not working..is there a way to use datasource properties from cloud config?

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

      It won't because Datasources are refreshed only during the process startup. It's a costly operation to do connection reinitialisation. You have to override Datasource creation at your app level to achieve it

    • @rohitbuddabathina
      @rohitbuddabathina 5 ปีที่แล้ว

      @@TechPrimers ohh okay, thank you 🙂

  • @tapashreesmruti
    @tapashreesmruti 6 ปีที่แล้ว

    Very nice vedio. Thank you for your effort. Your contribution of sharing knowledge means a lot to people like me. I tried this myself. But when i hit refresh in postman with POST, it gives error like Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]. Please help

  • @rajeshch1267
    @rajeshch1267 5 ปีที่แล้ว

    great explaination but how to configure svn. in my project i using svn sir.

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

      you can take a look at examples from here - github.com/spring-cloud-samples/svn-config-server

    • @rajeshch1267
      @rajeshch1267 5 ปีที่แล้ว

      Thank you so much sir

  • @myjava2844
    @myjava2844 4 ปีที่แล้ว

    I tired this but getting error while running Config Server
    PPLICATION FAILED TO START
    ***************************
    Description:
    Invalid config server configuration.
    Action:
    If you are using the git profile, you need to set a Git URI in your configuration. If you are using a native profile and have spring.cloud.config.server.bootstrap=true, you need to use a composite configuration.
    Can you please help

  • @MohaideenA
    @MohaideenA 6 ปีที่แล้ว

    How can we use public git repository instead of local git repository ?

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

      you can do like the one mentioned here - cloud.spring.io/spring-cloud-config/multi/multi__spring_cloud_config_server.html

  • @quangbinhinh7538
    @quangbinhinh7538 5 ปีที่แล้ว

    Still get error "Could not resolve placeholder" 'xxx' in value '${xxxx}'. Totally disappointed...

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

    Great demo!!
    I see you have added management.security.enabled=false in application.properties of client application. Can we disable security in testing/production environments? Is it not vulnerable if we do so? Can you please tell me about that and Can't we refresh client application with out disabling security?

    • @TechPrimers
      @TechPrimers  5 ปีที่แล้ว

      Yes Harish, it is vulnerable and we should not do this. You can have automations in place to have a different account which has access to this /refresh end point. Store the password of this account in a Vault and retrieve it via an API which has approval processes

    • @harishkilari8036
      @harishkilari8036 5 ปีที่แล้ว

      @@TechPrimersThanks for the response!! Could you help in getting any reference link/site/doc we can look into?

    • @TechPrimers
      @TechPrimers  5 ปีที่แล้ว

      You can get references for securing your service - stackoverflow.com/questions/29605201/how-to-secure-spring-cloud-config-server
      Use CyberArk APIs to retrieve password from a Vault.

  • @manishkushwaha4050
    @manishkushwaha4050 6 ปีที่แล้ว

    Hi My localhost:9991/refresh is not working and giving 404, could you please update me what is the issue, did i miss something ?

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      Is that the port with which u have started?

  • @asliyanage
    @asliyanage 6 ปีที่แล้ว

    why config server can't add Db properties?

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      We can add. however, Data Source creation(DB Connection creation) happens only during the process start. Hence its not a good practice to add DB Properties, because you need to do a DataSource reloading which is a costlier operation while the process is UP and running already

  • @narendrareddyd2645
    @narendrareddyd2645 6 ปีที่แล้ว

    How to implement profiles in this

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      Pls check profiles in spring boot video

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

    Great work...request you not to have the background music. It distracts a bit. Your videos are awesome.

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

      +Yadnyesh Juvekar sure yadnyesh. Will not have then in new ones

    • @3pearlpret
      @3pearlpret 6 ปีที่แล้ว

      please keep the music , its awesome :)

  • @rajeshch1267
    @rajeshch1267 5 ปีที่แล้ว

    Hai sir, Please clarify my doubts.we have 100 microservices available so one microservices server or application failed in production environment or in cloud. How should we know that microservices failed. Please replay sir

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

      You can use AppDynamics or Dynatrace or similar monitoring tools which monitors your microservice (typically using a actuator/health check endpoint) and raise alerts or leverage auto scaling capabilities of cloud which will create new instances automatically

    • @rajeshch1267
      @rajeshch1267 5 ปีที่แล้ว

      How to configure and any examples is there

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

    Thanks

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

    Спасибо

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

    Can you please upload the video without background music. It makes less focus about presentation.

  • @dharmaraogera3333
    @dharmaraogera3333 4 ปีที่แล้ว

    please add the server code in git

  • @agguLi
    @agguLi 4 ปีที่แล้ว

    I don't really get the advantage of this. In a real production env you (Docker or Kubernetes) you will use secrets and the instances will be orchestrated. I always use a .yml file and set my variables via env vars. The orchestrator handles changes and redeploys but keeping the old version alive and online till the new version is deployed and running. So the client will habe no down time. Besides an external config server increases coupling and the separate refresh call is pretty annoying too. I never used it and I guess I never will. But thanks for the video

  • @lovekeshkulria5807
    @lovekeshkulria5807 6 ปีที่แล้ว

    why can' t you reduce background music

  • @wikiiwOw
    @wikiiwOw 3 ปีที่แล้ว

    Bhai not bootstrap not working

  • @srikanths4602
    @srikanths4602 5 ปีที่แล้ว

    Great Explanation. Quick question at th-cam.com/video/b2ih5RCuxTM/w-d-xo.html couldn't understand how the git repository is initialized. Is is initialized just in the local ? Not in the github.com, Am I understanding it correctly ? Thanks

  • @kannatube1
    @kannatube1 2 ปีที่แล้ว

    best content, adding bgm is worst idea.. it is annoying

  • @trebleclef4889
    @trebleclef4889 5 ปีที่แล้ว

    Meybe real life example was better for understand when to using config server.

  • @sahinsarkar7293
    @sahinsarkar7293 5 ปีที่แล้ว

    The music should have been shut off. It's very distracting.

  • @nehanigam4997
    @nehanigam4997 5 ปีที่แล้ว

    music is really annoying, not able to concentrate!

  • @rasZam
    @rasZam 2 ปีที่แล้ว

    music in the background is annoying

  • @ajaybachhal3675
    @ajaybachhal3675 3 ปีที่แล้ว

    too many adds

  • @zhenjiehuang8321
    @zhenjiehuang8321 6 ปีที่แล้ว

    haha

  • @sayitlikeitis1202
    @sayitlikeitis1202 5 ปีที่แล้ว

    Please get RID of the background music !!! REALLY ANNOYING