0

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?

midi
  • 3,128
  • 5
  • 30
  • 47

1 Answers1

0

Check if below articles help !

  1. https://www.baeldung.com/java-restart-spring-boot-app

  2. Programmatically restart Spring Boot application / Refresh Spring Context (Does this article seem relevant? )

  3. https://javapointers.com/spring/spring-boot/how-to-restart-spring-boot-automatically-using-actuator/ (You can use actuator end point from another application to trigger a restart :P Although now recommended solution)

Harsh
  • 812
  • 1
  • 10
  • 23