funky-eyes commented on issue #6731:
URL: 
https://github.com/apache/incubator-seata/issues/6731#issuecomment-2268108959

   一个比较简单的方案,如果你是spring的应用
   `DefaultCommonFenceHandler.get().setFenceHandler(new SpringFenceHandler());`
   将上面的`SpringFenceHandler` 
包装后,用你的动态数据源处理后,再执行SpringFenceHandler的逻辑,或者你直接继承`SpringFenceHandler`进行处理动态数据源的逻辑
   
如果你不是spring的应用,你也可以通过这个api,自行扩展一个`FenceHandler`,再应用启动时第一时间放入`DefaultCommonFenceHandler`中
   
   A straightforward approach, if you are using a Spring application:
   
   `DefaultCommonFenceHandler.get().setFenceHandler(new SpringFenceHandler());`
   After wrapping the `SpringFenceHandler` with your dynamic data source 
handling, proceed to execute the logic of SpringFenceHandler. Alternatively, 
you can extend SpringFenceHandler directly to incorporate the dynamic data 
source logic.
   
   For applications not using Spring, you can also extend this API by 
independently extending a `FenceHandler` and placing it into 
`DefaultCommonFenceHandler` at startup.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to