Skip to content

Commit

Permalink
optimize the description of faq#23 (#876)
Browse files Browse the repository at this point in the history
  • Loading branch information
funky-eyes authored Jul 30, 2024
1 parent 6152782 commit f75c0e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ description: Seata FAQ.
<a href="#23" target="_self">23.Spring boot 1.5.x appear the Jackson related NoClassDefFoundException?</a>
<br/>

<a href="#24" target="_self">24.SpringCloud xid cannot transmit?</a>
<a href="#24" target="_self">24.SpringCloud/HTTP xid cannot transmit?</a>
<br/>

<a href="#25" target="_self">25.undo_log cannot be deleted after using the mybatis plus dynamic data source component?</a>
Expand Down Expand Up @@ -400,12 +400,13 @@ It is currently found that too low a version of Jackson that was originally intr

---

<h3 id='24'>Q: 24.SpringCloud xid cannot transmit?</h3>
<h3 id='24'>Q: 24.SpringCloud/HTTP xid cannot transmit?</h3>

**A:**

1. First make sure you introduce the `spring-cloud-alibaba-seata` dependency.
2. If XID cannot be delivered, please confirm whether you have implemented `WebMvcConfigurer`. If yes, please refer to the method of `com.alibaba.cloud.seata.web.seatahandlerinterceptorconfiguration#addinterceptors`. Add `SeataHandlerInterceptor` to your interception link
1. If it is the springcloud application, make sure you have introduced `spring-cloud-starter-alibaba-seata` as a dependency.
2. If the xid hasn't been accepted yet, please confirm whether you have implemented the `WebMvcConfigurer`; if you have, please add `org.apache.seata.integration.http.TransactionPropagationInterceptor.SeataHandlerInterceptor` to your interception chain. You can refer to how `org.apache.seata.integration.http.SeataWebMvcConfigurer` is implemented.
3. If it isn't a SpringCloud application, you can use `org.apache.seata.integration.http.DefaultHttpExecutor#getInstance `to invoke http when necessary, or refer to its implementation and encapsulate the httpclient to transfer xid by yourself.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ description: Seata 常见问题。
<a href="#23" target="_self">23. Spring boot 1.5.x 出现 jackson 相关 NoClassDefFoundException ?</a>
<br/>

<a href="#24" target="_self">24. SpringCloud xid 无法传递 ?</a>
<a href="#24" target="_self">24. SpringCloud/http调用 xid无法传递 ?</a>
<br/>

<a href="#25" target="_self">25. 使用动态数据源后的常见问题 ?</a>
Expand Down Expand Up @@ -419,13 +419,15 @@ Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.faster

---

<h3 id='24'>Q: 24. SpringCloud xid无法传递 ?</h3>
<h3 id='24'>Q: 24. SpringCloud/http调用 xid无法传递 ?</h3>

**A:**

1.首先确保你引入了`spring-cloud-starter-alibaba-seata`的依赖.
1.如果是springcloud应用首先确保你引入了`spring-cloud-starter-alibaba-seata`的依赖.

2.如果 xid 还无法传递,请确认你是否实现了 WebMvcConfigurer,如果是,请参考 com.alibaba.cloud.seata.web.SeataHandlerInterceptorConfiguration#addInterceptors 的方法.把 SeataHandlerInterceptor 加入到你的拦截链路中.
2.如果 xid 还无法被接受到,请确认你是否实现了 WebMvcConfigurer,如果是,请将org.apache.seata.integration.http.TransactionPropagationInterceptor.把 SeataHandlerInterceptor 加入到你的拦截链路中. 可以参考org.apache.seata.integration.http.SeataWebMvcConfigurer的实现方式进行.

3.如果是非SpringCloud应用,需要http调用时可以使用org.apache.seata.integration.http.DefaultHttpExecutor#getInstance 进行http调用,或者参考其实现,自行封装httpclient进行传递xid.

---

Expand Down

0 comments on commit f75c0e0

Please sign in to comment.