I have a @Configuration class which sets the header with the login credentials in RestTemplate for another spring application. Now when the other application restarts, the credentials are not valid anymore.
So the question is if it is possible to run this @Configuration class again programmatically when credentials are not valid anymore?