You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: i18n/en/docusaurus-plugin-content-docs/current/ops/upgrade.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,9 @@ description: Seata upgrade.
6
6
7
7
# Version Upgrade Guide
8
8
9
+
<ahref="#12"target="_self">12. What compatibility matters need to be paid attention to when upgrading to seata 2.7? </a>
10
+
<br/>
11
+
9
12
<ahref="#11"target="_self">11. What compatibility matters need to be paid attention to when upgrading to seata 2.5? </a>
10
13
<br/>
11
14
@@ -39,6 +42,22 @@ description: Seata upgrade.
39
42
<ahref="#1"target="_self">1. How to upgrade versions 0.8 and 0.9 to version 1.0? </a>
40
43
<br/>
41
44
45
+
------
46
+
<h3id='12'>12. What compatibility matters need to be paid attention to when upgrading to seata 2.7?</h3>
47
+
<details>
48
+
<summary><mark>Notes</mark></summary>
49
+
50
+
1. Seata 2.7 introduces a unified JSON module, `json-common`, to centralize internal JSON serialization, deserialization, and security control capabilities.
51
+
2. The default JSON serializer is now `jackson`. If no JSON serializer is explicitly configured, `JsonUtil` resolves to `jackson`.
52
+
3. The JSON serializer should be switched through the Spring Boot property `seata.json.serializer-type` or the native Seata property `json.serializerType`, with supported values `jackson`, `fastjson`, `fastjson2`, `gson`, and `jackson3`.
53
+
4. Seata 2.7 adds support for `fastjson2` and `jackson3`. If you plan to enable `jackson3`, the runtime environment must be JDK 17 or later.
54
+
5. If `jackson3` is configured but its implementation is not available in the current environment, Seata will automatically fall back to `jackson`.
55
+
6. Seata 2.7 introduces a JSON deserialization allowlist mechanism. If a business object is deserialized from JSON with type information and the target class is not in the allowlist, you may see a `Class not in JSON deserialization allowlist` exception.
56
+
7. To allow custom business classes, you can extend the allowlist with `seata.json.allowlist=com.example.order.,com.example.dto.,com.example.CustomContext`; a value ending with `.` means package prefix matching, while a value without `.` means exact class name matching.
57
+
8. The default allowlist already includes common JDK primitive types, collection types, time types, and the package prefixes `org.apache.seata.` and `io.seata.`.
58
+
9. The old TCC-specific properties `seata.tcc.context-json-parser-type` / `tcc.contextJsonParserType` are still read as a compatibility fallback, but they have been deprecated since 2.7.0. If both old and new properties exist, the new `json.serializerType` takes precedence.
59
+
</details>
60
+
42
61
------
43
62
<h3id='11'>11. What compatibility matters need to be paid attention to when upgrading to seata 2.5?</h3>
Copy file name to clipboardExpand all lines: i18n/en/docusaurus-plugin-content-docs/current/overview/faq.md
+72Lines changed: 72 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,18 @@ Error: A fatal exception has occurred. Program will exit.?</a>
147
147
<ahref="#46"target="_self">46. Why does Seata report LockWaitTimeoutException due to table name case sensitivity in global transaction lock reentrancy? </a>
148
148
<br/>
149
149
150
+
<ahref="#47"target="_self">47. What is `json-common` used for?</a>
151
+
<br/>
152
+
153
+
<ahref="#48"target="_self">48. Do I have to switch to `fastjson2` or `jackson3` after upgrading to 2.7?</a>
154
+
<br/>
155
+
156
+
<ahref="#49"target="_self">49. In what scenarios should I pay attention to the JSON deserialization allowlist?</a>
157
+
<br/>
158
+
159
+
<ahref="#50"target="_self">50. When is it appropriate to use `jackson3`?</a>
160
+
<br/>
161
+
150
162
---
151
163
152
164
<h3id='1'>Q: 1.Can Seata be used in a production environment?</h3>
@@ -773,3 +785,63 @@ public class SetSeataInterceptor implements RequestInterceptor {
773
785
- Remove useOldAliasMetadataBehavior=true from your MySQL JDBC URL or set it to false.
774
786
775
787
---
788
+
789
+
<h3 id='47'>Q: 47. What is `json-common` used for?</h3>
790
+
791
+
**A:** `json-common` is Seata's unified JSON abstraction layer. It centralizes Seata's internal JSON SPI, utility classes, and security checks. The most direct current use case is JSON serialization and deserialization for TCC `BusinessActionContext`.
2. Provide a unified entry for internal JSON serialization and deserialization in Seata
797
+
3. Add allowlist-based security control for deserialization with type information
798
+
799
+
---
800
+
801
+
<h3 id='48'>Q: 48. Do I have to switch to `fastjson2` or `jackson3` after upgrading to 2.7?</h3>
802
+
803
+
**A:** No. The default JSON serializer is now `jackson`. The introduction of `json-common` is primarily for capability unification and stronger security controls, not to force an immediate switch to `fastjson2` or `jackson3` during upgrade.
804
+
805
+
If you want to switch the JSON serializer, Spring Boot applications should use:
806
+
807
+
```yaml
808
+
seata:
809
+
json:
810
+
serializer-type: fastjson2
811
+
```
812
+
813
+
Native Seata configuration should use:
814
+
815
+
```properties
816
+
json.serializerType=fastjson2
817
+
```
818
+
819
+
The old TCC-specific properties `seata.tcc.context-json-parser-type` / `tcc.contextJsonParserType` are still read as a compatibility fallback, but they have been deprecated since 2.7.0.
820
+
821
+
---
822
+
823
+
<h3id='49'>Q: 49. In what scenarios should I pay attention to the JSON deserialization allowlist?</h3>
824
+
825
+
**A:** Pay special attention in the following scenarios:
826
+
827
+
1. Custom business objects are stored in the TCC context
828
+
2. Your business relies on type metadata such as `@type` to restore concrete subclasses
829
+
3. Extensions directly use Seata's JSON SPI for deserialization with type information
830
+
831
+
If you see a `Class not in JSON deserialization allowlist` exception after upgrading, add the corresponding business classes to `seata.json.allowlist`, for example:
Here, a value ending with `.` means package prefix matching, while a value without `.` means exact class name matching.
838
+
839
+
---
840
+
841
+
<h3id='50'>Q: 50. When is it appropriate to use `jackson3`?</h3>
842
+
843
+
**A:** You can consider enabling `jackson3` when your runtime environment is already JDK 17 or later and you want to use the Jackson 3 ecosystem. If you still have JDK 8 or JDK 11 environments, it is better not to switch yet.
844
+
845
+
If `jackson3` is configured but its implementation is not available in the current environment, Seata will automatically fall back to `jackson`.
0 commit comments