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..
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.
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.
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!
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 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.
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?
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.
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.
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
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?
+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
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 ?
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?
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??
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
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.
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
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?
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.
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?
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
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
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
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....
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
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
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
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?
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
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.
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
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
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
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
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
Great explanation and easily understandable. Like BGM playing when explaining.
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..
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.
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.
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!
+kaipulla77 sure. Thanks dude
Good tutorial. Good explanation and demo of the architecture, usage of spring-cloud annotations and the code. Thank you.
thanks channu.
Cool dude.. Its pretty simple and well explained for beginners. first time seeing your tutorial and impressed.
Excellent! Many thanks
Please don't mix background music, its really distracting.. all the videos are really good. But please take care of this.
Amazing cleared my concept thanks 🙏
excellent explanation! many thanks
Please mute the background music :)
Excellent awesome. This should be sufficient enough to work on similar project
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..
Yes you can configure another instance
Great videos and clear explanation. Thanks a ton, it helped me a lot.
+Krishnaraj Sooji my pleasure Krishnaraj. Glad that was helpful
@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.
Excellent presentation. Great learning
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?
clear explanation in simplicity
Precisely Great. Nice Music
simple and clear, thanks for the video.. :)
very clear, thank you.
Nicely Explained , Thank you
Great effort! Just one concern, what 8f I would have to configure multiple properties like client.properties, db.properties etc
Good Explanation, how do we differentiate with different profiles like DEV, Integration, Certification and Production
Can you do a video on Oauth 2 with angular front end with two are pages navigation to propagate the token to services?
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.
BGM is very disturbing, kindly avoid. Good explanations and we would like to get benefitted from your videos.
Awesome ❤️❤️❤️❤️🔥
Thank you so much.. So nice of you.... God bless.... Great work... :) :) :)
my pleasure Fairoz
Please do not play background music, sometime annoying a lot. Thanks for the demo though
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.
Please remove the BGM that's distracting the concentration . Your videos are really useful thank you
Simple , informative and effective , Love ur all tutorials !!! Can you tell me how you opened two projects in separate window in intellijIdea
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
Great Explanation!!!!!
enjoyed the cloud knowledge with music.. Thanks
Can you create a sample with same but configuration should fetch from database
Thanks for sharing. Very informative! Can u share a video on zookeeper also?
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??
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?
+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
well explained thank you
+vanitha basavanna thanks Vanitha. Glad that was useful
Good explanation but please avoid background music it's very disturbing
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 ?
Hi I want to do poc on spring cloud config server using docker?? Please can you help me about this
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?
Yes,
Hey, your videos are great , can you create a video about PCF and how to deploy microservices in PCF.
Not sure if you already saw it. Its already there - th-cam.com/video/hzWEw--OziQ/w-d-xo.html
Hello Tech Primers! Could you make config-server available on github? It is not available at the moment.
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??
Very useful
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
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.
when we have config changes in multiple microservices and need to apply refresh then we can use Spring cloud Bus. :)
spring cloud server code is not present in the git repo, can u please add it?
How client knows there is change is git repository and call refresh ?
nicely explained.
Thanks Arun. Glad that was helpful
How you can maintain different versions of config server for same app with different version?
War your using server configuration right?
can we get secrets and config maps from git repo to config client ?? through cofig server ??? pls explain me that Sir
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
nice explanation,could u do a video on how to handle transaction in micro services based architecture applications
sure Sam. i will do that soon.
Can you please upload code for config server; it is not available in the github location mentioned above.
you can check out the project - github.com/TechPrimers/spring-boot-config-server-example
There is no code under config-server at that link
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?
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.
can we write config client and server in same boot application?
I think the config server folder in github does not exist any more.
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?
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
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
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
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....
Fantastic tutorial.... Can you please get rid of the background music.....pl pl pl
code-server code missing from Github. Thanks for Tutorial though. Good job.
/refresh is not working. Not sure of the reason.
You don't need to restart the client. That's the point right?
You are right
well explained
thanks vanitha. Glad that was useful
For datasource properties it's not working..is there a way to use datasource properties from cloud config?
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
@@TechPrimers ohh okay, thank you 🙂
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
great explaination but how to configure svn. in my project i using svn sir.
you can take a look at examples from here - github.com/spring-cloud-samples/svn-config-server
Thank you so much sir
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
How can we use public git repository instead of local git repository ?
you can do like the one mentioned here - cloud.spring.io/spring-cloud-config/multi/multi__spring_cloud_config_server.html
Still get error "Could not resolve placeholder" 'xxx' in value '${xxxx}'. Totally disappointed...
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?
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
@@TechPrimersThanks for the response!! Could you help in getting any reference link/site/doc we can look into?
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.
Hi My localhost:9991/refresh is not working and giving 404, could you please update me what is the issue, did i miss something ?
Is that the port with which u have started?
why config server can't add Db properties?
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
How to implement profiles in this
Pls check profiles in spring boot video
Great work...request you not to have the background music. It distracts a bit. Your videos are awesome.
+Yadnyesh Juvekar sure yadnyesh. Will not have then in new ones
please keep the music , its awesome :)
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
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
How to configure and any examples is there
Thanks
Спасибо
Can you please upload the video without background music. It makes less focus about presentation.
please add the server code in git
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
why can' t you reduce background music
Bhai not bootstrap not working
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
best content, adding bgm is worst idea.. it is annoying
Meybe real life example was better for understand when to using config server.
The music should have been shut off. It's very distracting.
music is really annoying, not able to concentrate!
music in the background is annoying
too many adds
haha
Please get RID of the background music !!! REALLY ANNOYING