I have to use a rest api call to get an accesstoken which is valid for 15 minutes. Using that auth token i call other apis. I want to write a scheduler to invoke that api every 15 mins and set it to my bean so that i can autowire my bean and use token in api calls. I could not invoke a @bean annotated method from @sheduled method. Is there any work around?
I could not invoke a @bean annotated method from @sheduled method. Is there any work around?