847850277 commented on PR #4867:
URL: https://github.com/apache/shenyu/pull/4867#issuecomment-1639770651

   > client shutdown close method call twice ? how to fixed?
   
   yes。
   1、`ShenyuClientRegisterRepository` bean destry the `close` methd will be 
call.
   2、and `Runtime.getRuntime().addShutdownHook(new 
Thread(repository::closeRepository, name));` will be call.
   
   `By default, JavaConfig configured beans are used. If there is a close or 
shutdown method, this method will be automatically executed when the bean is 
destroyed. If you do not want to execute this method, add @ Bean 
(destroyMethod="") to prevent the destruction method from starting`
   
   i try rename `close` methd to `closeRepository` can solve spring call 
default close method.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to