Programmatically restart Spring Boot application

前端 未结 3 671
挽巷
挽巷 2020-12-20 13:11

I\'m using Spring Boot and I\'ve got a use case where user can upload a file which should cause a restart of application (since user\'s upload is used during creation of mul

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-20 13:29

    In your case it might be possible to use the /refresh endpoint (see http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_endpoints) and annotate the beans that depend on the changed configuration with @RefreshScope.

提交回复
热议问题