This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-integration-cases.git


The following commit(s) were added to refs/heads/main by this push:
     new d405af06 Import jdk serialization by spi (#40)
d405af06 is described below

commit d405af061e3094e6fc272a64ebba8144957e9d56
Author: Albumen Kevin <[email protected]>
AuthorDate: Fri Sep 6 15:39:05 2024 +0800

    Import jdk serialization by spi (#40)
---
 .../case-versions.conf                             |   2 +-
 .../case-configuration.yml                         |  48 ++++
 .../case-versions.conf                             |   2 +-
 .../pom.xml                                        |  31 +++
 .../prefer/serialization/api/DemoService.java      |  22 ++
 .../pom.xml                                        |   6 +-
 .../java/org/apache/dubbo/samples/FakeMain.java    |  23 ++
 .../samples/prefer/serialization/ConsumerIT.java   | 251 +++++++++++++++++++
 .../prefer/serialization/SerializationWrapper.java |  71 ++++++
 ...org.apache.dubbo.common.serialize.Serialization |   1 +
 .../src/test/resources/log4j2-test.xml             |  29 +++
 .../pom.xml                                        |   6 +-
 .../prefer/serialization/DemoServiceImpl.java      |  26 ++
 .../prefer/serialization/DubboProvider.java        | 268 +++++++++++++++++++++
 .../src/main/resources/log4j2.xml                  |  29 +++
 .../pom.xml                                        |  10 +-
 .../case-versions.conf                             |   2 +-
 .../pom.xml                                        |   5 +
 .../pom.xml                                        |   5 +
 .../pom.xml                                        |   9 +-
 99-integration/dubbo-samples-test-13441-3/pom.xml  |   2 +-
 99-integration/dubbo-samples-test-13441-4/pom.xml  |   2 +-
 99-integration/dubbo-samples-test-13441-5/pom.xml  |   2 +-
 99-integration/dubbo-samples-test-13441-6/pom.xml  |   2 +-
 99-integration/dubbo-samples-test-13441-7/pom.xml  |   2 +-
 99-integration/pom.xml                             |   1 +
 26 files changed, 837 insertions(+), 20 deletions(-)

diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-31x/case-versions.conf 
b/99-integration/dubbo-samples-prefer-serialization-test-31x/case-versions.conf
index 1a75dd09..1f6c26a6 100644
--- 
a/99-integration/dubbo-samples-prefer-serialization-test-31x/case-versions.conf
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-31x/case-versions.conf
@@ -20,6 +20,6 @@
 # Supported component versions of the test case
 
 # Spring app
-dubbo.version=[ >= 3.2.0 ]
+dubbo.version= 3.2*
 spring.version=4.*, 5.*
 java.version= [<= 11]
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-32x/case-configuration.yml
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/case-configuration.yml
new file mode 100644
index 00000000..2b7bbe9c
--- /dev/null
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/case-configuration.yml
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+services:
+  zookeeper:
+    image: zookeeper:latest
+
+  dubbo-samples-prefer-serialization-test-32x-provider:
+    type: app
+    basedir: dubbo-samples-prefer-serialization-test-32x-provider
+    mainClass: org.apache.dubbo.samples.prefer.serialization.DubboProvider
+    systemProps:
+      - zookeeper.address=zookeeper
+    waitPortsBeforeRun:
+      - zookeeper:2181
+    checkPorts:
+      - 20880
+    checkLog: "dubbo service started"
+    depends_on:
+      - zookeeper
+
+  dubbo-samples-prefer-serialization-test-32x-consumer:
+    type: test
+    basedir: dubbo-samples-prefer-serialization-test-32x-consumer
+    tests:
+      - "**/*IT.class"
+    systemProps:
+      - zookeeper.address=zookeeper
+    waitPortsBeforeRun:
+      - zookeeper:2181
+      - dubbo-samples-prefer-serialization-test-32x-provider:20880
+    depends_on:
+      - zookeeper
+      - dubbo-samples-prefer-serialization-test-32x-provider
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test/case-versions.conf 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/case-versions.conf
similarity index 97%
copy from 
99-integration/dubbo-samples-prefer-serialization-test/case-versions.conf
copy to 
99-integration/dubbo-samples-prefer-serialization-test-32x/case-versions.conf
index 56b50b22..4b1b28d5 100644
--- a/99-integration/dubbo-samples-prefer-serialization-test/case-versions.conf
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/case-versions.conf
@@ -20,6 +20,6 @@
 # Supported component versions of the test case
 
 # Spring app
-dubbo.version=[ >= 3.2.0 ]
+dubbo.version= 3.2*
 spring.version=4.*, 5.*
 java.version= [>= 8]
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-api/pom.xml
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-api/pom.xml
new file mode 100644
index 00000000..262d68de
--- /dev/null
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-api/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <parent>
+        <artifactId>dubbo-samples-prefer-serialization-test-32x</artifactId>
+        <groupId>org.apache.dubbo</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>dubbo-samples-prefer-serialization-test-32x-api</artifactId>
+    <name>Dubbo Samples Prefer Serialization Test API</name>
+    <description>Dubbo Samples Prefer Serialization Integration Test 
API</description>
+</project>
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-api/src/main/java/org/apache/dubbo/samples/prefer/serialization/api/DemoService.java
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-api/src/main/java/org/apache/dubbo/samples/prefer/serialization/api/DemoService.java
new file mode 100644
index 00000000..e4a54d35
--- /dev/null
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-api/src/main/java/org/apache/dubbo/samples/prefer/serialization/api/DemoService.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dubbo.samples.prefer.serialization.api;
+
+public interface DemoService {
+    String sayHello(String name);
+}
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-consumer/pom.xml
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/pom.xml
similarity index 95%
copy from 
99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-consumer/pom.xml
copy to 
99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/pom.xml
index 607ee638..ea02e832 100644
--- 
a/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-consumer/pom.xml
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/pom.xml
@@ -19,20 +19,20 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
     <parent>
-        <artifactId>dubbo-samples-prefer-serialization-test</artifactId>
+        <artifactId>dubbo-samples-prefer-serialization-test-32x</artifactId>
         <groupId>org.apache.dubbo</groupId>
         <version>1.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>dubbo-samples-prefer-serialization-test-consumer</artifactId>
+    
<artifactId>dubbo-samples-prefer-serialization-test-32x-consumer</artifactId>
     <name>Dubbo Samples Prefer Serialization Test Consumer</name>
     <description>Dubbo Samples Prefer Serialization Integration Test 
Consumer</description>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.dubbo</groupId>
-            
<artifactId>dubbo-samples-prefer-serialization-test-api</artifactId>
+            
<artifactId>dubbo-samples-prefer-serialization-test-32x-api</artifactId>
         </dependency>
 
         <dependency>
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/main/java/org/apache/dubbo/samples/FakeMain.java
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/main/java/org/apache/dubbo/samples/FakeMain.java
new file mode 100644
index 00000000..db2e7d56
--- /dev/null
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/main/java/org/apache/dubbo/samples/FakeMain.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.samples;
+
+public class FakeMain {
+    public static void main(String[] args) {
+
+    }
+}
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/java/org/apache/dubbo/samples/prefer/serialization/ConsumerIT.java
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/java/org/apache/dubbo/samples/prefer/serialization/ConsumerIT.java
new file mode 100644
index 00000000..efd37fce
--- /dev/null
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/java/org/apache/dubbo/samples/prefer/serialization/ConsumerIT.java
@@ -0,0 +1,251 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.samples.prefer.serialization;
+
+import org.apache.dubbo.common.Version;
+import org.apache.dubbo.common.serialize.Serialization;
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ReferenceConfig;
+import org.apache.dubbo.config.RegistryConfig;
+import org.apache.dubbo.config.bootstrap.DubboBootstrap;
+import org.apache.dubbo.rpc.model.ApplicationModel;
+import org.apache.dubbo.rpc.model.FrameworkModel;
+import org.apache.dubbo.samples.prefer.serialization.api.DemoService;
+
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+// in 3.1.x, service config's serialization > protocol config's serialization
+// in 3.2.x, service config's prefer serialization > service config's 
serialization >
+//           protocol config's prefer serialization > protocol config's 
serialization
+public class ConsumerIT {
+    private static FrameworkModel frameworkModel;
+    private static ApplicationModel applicationModel;
+
+    private static final Byte HESSIAN2_SERIALIZATION_ID = 
FrameworkModel.defaultModel().getExtensionLoader(Serialization.class).getExtension("hessian2",
 false).getContentTypeId();
+    private static final Byte FASTJSON2_SERIALIZATION_ID = 
FrameworkModel.defaultModel().getExtensionLoader(Serialization.class).getExtension("fastjson2",
 false).getContentTypeId();
+    private static final Byte GSON_SERIALIZATION_ID = 
FrameworkModel.defaultModel().getExtensionLoader(Serialization.class).getExtension("gson",
 false).getContentTypeId();
+    private static final Byte FASTJSON_SERIALIZATION_ID = 
FrameworkModel.defaultModel().getExtensionLoader(Serialization.class).getExtension("fastjson",
 false).getContentTypeId();
+    private static final Byte JAVA_SERIALIZATION_ID = 
FrameworkModel.defaultModel().getExtensionLoader(Serialization.class).getExtension("java",
 false).getContentTypeId();
+
+    @BeforeClass
+    public static void setup() {
+        frameworkModel = new FrameworkModel();
+        applicationModel = frameworkModel.newApplication();
+        DubboBootstrap bootstrap = 
DubboBootstrap.getInstance(applicationModel);
+        bootstrap.registry(new RegistryConfig("zookeeper://" + 
System.getProperty("zookeeper.address", "127.0.0.1") + ":2181"))
+                .application(new 
ApplicationConfig("serialization-test-consumer"))
+                .start();
+    }
+
+    @AfterClass
+    public static void teardown() {
+        frameworkModel.destroy();
+    }
+
+    // protocol config set serialization as null, prefer serialization is set 
as null
+    // service config set serialization as null, prefer serialization is set 
as null
+    // in 3.1.x, will use hessian2 serialization
+    // in 3.2.x, will use fastjson2 serialization
+    @Test
+    public void test1() {
+        DemoService demoService = getDemoService("1.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        Byte expectedId = Version.getVersion().startsWith("3.2")
+                ? FASTJSON2_SERIALIZATION_ID : HESSIAN2_SERIALIZATION_ID;
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(expectedId)));
+    }
+
+    // protocol config set serialization as java, prefer serialization is set 
as null
+    // service config set serialization as null, prefer serialization is set 
as null
+    // in 3.1.x, will use java serialization
+    // in 3.2.x, will use java serialization
+    @Test
+    public void test2() {
+        DemoService demoService = getDemoService("2.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(JAVA_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as null, prefer serialization is set 
as null
+    // service config set serialization as java, prefer serialization is set 
as null
+    // in 3.1.x, will use java serialization
+    // in 3.2.x, will use java serialization
+    @Test
+    public void test3() {
+        DemoService demoService = getDemoService("3.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(JAVA_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as null, prefer serialization is set 
as java
+    // service config set serialization as null, prefer serialization is set 
as null
+    // in 3.1.x, will use hessian2 serialization
+    // in 3.2.x, will use java serialization
+    @Test
+    public void test4() {
+        DemoService demoService = getDemoService("4.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(JAVA_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as null, prefer serialization is set 
as null
+    // service config set serialization as null, prefer serialization is set 
as java
+    // in 3.1.x, will use hessian2 serialization
+    // in 3.2.x, will use java serialization
+    @Test
+    public void test5() {
+        DemoService demoService = getDemoService("5.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(JAVA_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as java, prefer serialization is set 
as null
+    // service config set serialization as fastjson, prefer serialization is 
set as null
+    // in 3.1.x, will use fastjson serialization
+    // in 3.2.x, will use fastjson serialization
+    @Test
+    public void test6() {
+        DemoService demoService = getDemoService("6.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(FASTJSON_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as null, prefer serialization is set 
as java
+    // service config set serialization as null, prefer serialization is set 
as fastjson
+    // in 3.1.x, will use hessian2 serialization
+    // in 3.2.x, will use fastjson serialization
+    @Test
+    public void test7() {
+        DemoService demoService = getDemoService("7.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(FASTJSON_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as java, prefer serialization is set 
as fastjson
+    // service config set serialization as null, prefer serialization is set 
as null
+    // in 3.1.x, will use java serialization
+    // in 3.2.x, will use fastjson serialization
+    @Test
+    public void test8() {
+        DemoService demoService = getDemoService("8.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(FASTJSON_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as null, prefer serialization is set 
as null
+    // service config set serialization as java, prefer serialization is set 
as fastjson
+    // in 3.1.x, will use java serialization
+    // in 3.2.x, will use fastjson serialization
+    @Test
+    public void test9() {
+        DemoService demoService = getDemoService("9.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(FASTJSON_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as fastjson, prefer serialization is 
set as null
+    // service config set serialization as null, prefer serialization is set 
as java
+    // in 3.1.x, will use fastjson serialization
+    // in 3.2.x, will use java serialization
+    @Test
+    public void test10() {
+        DemoService demoService = getDemoService("10.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(JAVA_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as null, prefer serialization is set 
as fastjson
+    // service config set serialization as java, prefer serialization is set 
as null
+    // in 3.1.x, will use java serialization
+    // in 3.2.x, will use java serialization
+    @Test
+    public void test11() {
+        DemoService demoService = getDemoService("11.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(JAVA_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as gson, prefer serialization is set 
as fastjson
+    // service config set serialization as java, prefer serialization is set 
as null
+    // in 3.1.x, will use java serialization
+    // in 3.2.x, will use java serialization
+    @Test
+    public void test12() {
+        DemoService demoService = getDemoService("12.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(JAVA_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as gson, prefer serialization is set 
as fastjson
+    // service config set serialization as null, prefer serialization is set 
as java
+    // in 3.1.x, will use gson serialization
+    // in 3.2.x, will use java serialization
+    @Test
+    public void test13() {
+        DemoService demoService = getDemoService("13.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(JAVA_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as gson, prefer serialization is set 
as null
+    // service config set serialization as fastjson, prefer serialization is 
set as java
+    // in 3.1.x, will use fastjson serialization
+    // in 3.2.x, will use java serialization
+    @Test
+    public void test14() {
+        DemoService demoService = getDemoService("14.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(JAVA_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as null, prefer serialization is set 
as gson
+    // service config set serialization as fastjson, prefer serialization is 
set as java
+    // in 3.1.x, will use fastjson serialization
+    // in 3.2.x, will use java serialization
+    @Test
+    public void test15() {
+        DemoService demoService = getDemoService("15.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(JAVA_SERIALIZATION_ID)));
+    }
+
+    // protocol config set serialization as fst, prefer serialization is set 
as gson
+    // service config set serialization as fastjson, prefer serialization is 
set as java
+    // in 3.1.x, will use fastjson serialization
+    // in 3.2.x, will use java serialization
+    @Test
+    public void test16() {
+        DemoService demoService = getDemoService("16.0.0");
+        Assert.assertEquals("Hello world", demoService.sayHello("world"));
+        
Assert.assertTrue(SerializationWrapper.getUsedSerialization().stream().allMatch(s
 -> s.equals(JAVA_SERIALIZATION_ID)));
+    }
+
+    private DemoService getDemoService(String version) {
+        ReferenceConfig<DemoService> referenceConfig = new 
ReferenceConfig<>(applicationModel.newModule());
+        referenceConfig.setInterface(DemoService.class);
+        referenceConfig.setVersion(version);
+        try {
+            return referenceConfig.get();
+        } finally {
+            SerializationWrapper.getUsedSerialization().clear();
+        }
+    }
+
+}
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/java/org/apache/dubbo/samples/prefer/serialization/SerializationWrapper.java
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/java/org/apache/dubbo/samples/prefer/serialization/SerializationWrapper.java
new file mode 100644
index 00000000..0488ab9e
--- /dev/null
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/java/org/apache/dubbo/samples/prefer/serialization/SerializationWrapper.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.samples.prefer.serialization;
+
+import org.apache.dubbo.common.URL;
+import org.apache.dubbo.common.serialize.ObjectInput;
+import org.apache.dubbo.common.serialize.ObjectOutput;
+import org.apache.dubbo.common.serialize.Serialization;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class SerializationWrapper implements Serialization {
+
+    private static final List<Byte> usedSerialization = 
Collections.synchronizedList(new ArrayList<Byte>());
+
+    private Serialization serialization;
+
+    public SerializationWrapper(Serialization serialization) {
+        this.serialization = serialization;
+    }
+
+    @Override
+    public byte getContentTypeId() {
+        return serialization.getContentTypeId();
+    }
+
+    @Override
+    public String getContentType() {
+        return serialization.getContentType();
+    }
+
+    @Override
+    public ObjectOutput serialize(URL url, OutputStream output) throws 
IOException {
+        usedSerialization.add(serialization.getContentTypeId());
+        return serialization.serialize(url, output);
+    }
+
+    @Override
+    public ObjectInput deserialize(URL url, InputStream input) throws 
IOException {
+        usedSerialization.add(serialization.getContentTypeId());
+        return serialization.deserialize(url, input);
+    }
+
+    @Override
+    public String toString() {
+        return serialization.toString();
+    }
+
+    public static List<Byte> getUsedSerialization() {
+        return usedSerialization;
+    }
+}
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/resources/META-INF/dubbo/org.apache.dubbo.common.serialize.Serialization
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/resources/META-INF/dubbo/org.apache.dubbo.common.serialize.Serialization
new file mode 100644
index 00000000..96cb0336
--- /dev/null
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/resources/META-INF/dubbo/org.apache.dubbo.common.serialize.Serialization
@@ -0,0 +1 @@
+wrap=org.apache.dubbo.samples.prefer.serialization.SerializationWrapper
\ No newline at end of file
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/resources/log4j2-test.xml
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/resources/log4j2-test.xml
new file mode 100644
index 00000000..41bc586a
--- /dev/null
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-consumer/src/test/resources/log4j2-test.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<Configuration status="WARN">
+    <Appenders>
+        <Console name="Console" target="SYSTEM_OUT" follow="true">
+            <PatternLayout pattern="%d{HH:mm:ss.SSS} |-%highlight{%-5p} [%t] 
%40.40c:%-3L -| 
%m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect,org.junit)}"
 charset="UTF-8"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Root level="info">
+            <AppenderRef ref="Console"/>
+        </Root>
+    </Loggers>
+</Configuration>
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-provider/pom.xml
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/pom.xml
similarity index 95%
copy from 
99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-provider/pom.xml
copy to 
99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/pom.xml
index e84b157c..8b59763f 100644
--- 
a/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-provider/pom.xml
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/pom.xml
@@ -19,20 +19,20 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
     <parent>
-        <artifactId>dubbo-samples-prefer-serialization-test</artifactId>
+        <artifactId>dubbo-samples-prefer-serialization-test-32x</artifactId>
         <groupId>org.apache.dubbo</groupId>
         <version>1.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>dubbo-samples-prefer-serialization-test-provider</artifactId>
+    
<artifactId>dubbo-samples-prefer-serialization-test-32x-provider</artifactId>
     <name>Dubbo Samples Prefer Serialization Test Provider</name>
     <description>Dubbo Samples Prefer Serialization Integration Test 
Provider</description>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.dubbo</groupId>
-            
<artifactId>dubbo-samples-prefer-serialization-test-api</artifactId>
+            
<artifactId>dubbo-samples-prefer-serialization-test-32x-api</artifactId>
         </dependency>
 
         <dependency>
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/src/main/java/org/apache/dubbo/samples/prefer/serialization/DemoServiceImpl.java
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/src/main/java/org/apache/dubbo/samples/prefer/serialization/DemoServiceImpl.java
new file mode 100644
index 00000000..a89895d9
--- /dev/null
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/src/main/java/org/apache/dubbo/samples/prefer/serialization/DemoServiceImpl.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.samples.prefer.serialization;
+
+import org.apache.dubbo.samples.prefer.serialization.api.DemoService;
+
+public class DemoServiceImpl implements DemoService {
+    @Override
+    public String sayHello(String name) {
+        return "Hello " + name;
+    }
+}
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/src/main/java/org/apache/dubbo/samples/prefer/serialization/DubboProvider.java
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/src/main/java/org/apache/dubbo/samples/prefer/serialization/DubboProvider.java
new file mode 100644
index 00000000..1e081b39
--- /dev/null
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/src/main/java/org/apache/dubbo/samples/prefer/serialization/DubboProvider.java
@@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.samples.prefer.serialization;
+
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ProtocolConfig;
+import org.apache.dubbo.config.RegistryConfig;
+import org.apache.dubbo.config.ServiceConfig;
+import org.apache.dubbo.config.bootstrap.DubboBootstrap;
+import org.apache.dubbo.rpc.model.FrameworkModel;
+import org.apache.dubbo.samples.prefer.serialization.api.DemoService;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicInteger;
+
+public class DubboProvider {
+    private static final String FASTJSON_SERIALIZATION = "fastjson";
+    private static final String JAVA_SERIALIZATION = "java";
+    private static final String GSON_SERIALIZATION = "gson";
+    private static final String FST_SERIALIZATION = "fst";
+
+    public static void main(String[] args) throws InterruptedException {
+        FrameworkModel frameworkModel = new FrameworkModel();
+
+        // in 3.1.x, service config's serialization > protocol config's 
serialization
+        // in 3.2.x, service config's prefer serialization > service config's 
serialization >
+        //           protocol config's prefer serialization > protocol 
config's serialization
+
+        // protocol config set serialization as null, prefer serialization is 
set as null
+        // service config set serialization as null, prefer serialization is 
set as null
+        // in 3.1.x, will use hessian2 serialization
+        // in 3.2.x, will use fastjson2 serialization
+        exportService(frameworkModel,
+                null,
+                null,
+                null,
+                null,
+                "1.0.0");
+        System.out.println("1.0.0 service exported");
+
+        // protocol config set serialization as java, prefer serialization is 
set as null
+        // service config set serialization as null, prefer serialization is 
set as null
+        // in 3.1.x, will use java serialization
+        // in 3.2.x, will use java serialization
+        exportService(frameworkModel,
+                JAVA_SERIALIZATION,
+                null,
+                null,
+                null,
+                "2.0.0");
+        System.out.println("2.0.0 service exported");
+
+        // protocol config set serialization as null, prefer serialization is 
set as null
+        // service config set serialization as java, prefer serialization is 
set as null
+        // in 3.1.x, will use java serialization
+        // in 3.2.x, will use java serialization
+        exportService(frameworkModel,
+                null,
+                JAVA_SERIALIZATION,
+                null,
+                null,
+                "3.0.0");
+        System.out.println("3.0.0 service exported");
+
+        // protocol config set serialization as null, prefer serialization is 
set as java
+        // service config set serialization as null, prefer serialization is 
set as null
+        // in 3.1.x, will use hessian2 serialization
+        // in 3.2.x, will use java serialization
+        exportService(frameworkModel,
+                null,
+                null,
+                JAVA_SERIALIZATION,
+                null,
+                "4.0.0");
+        System.out.println("4.0.0 service exported");
+
+        // protocol config set serialization as null, prefer serialization is 
set as null
+        // service config set serialization as null, prefer serialization is 
set as java
+        // in 3.1.x, will use hessian2 serialization
+        // in 3.2.x, will use java serialization
+        exportService(frameworkModel,
+                null,
+                null,
+                null,
+                JAVA_SERIALIZATION,
+                "5.0.0");
+        System.out.println("5.0.0 service exported");
+
+        // protocol config set serialization as java, prefer serialization is 
set as null
+        // service config set serialization as fastjson, prefer serialization 
is set as null
+        // in 3.1.x, will use fastjson serialization
+        // in 3.2.x, will use fastjson serialization
+        exportService(frameworkModel,
+                JAVA_SERIALIZATION,
+                FASTJSON_SERIALIZATION,
+                null,
+                null,
+                "6.0.0");
+        System.out.println("6.0.0 service exported");
+
+        // protocol config set serialization as null, prefer serialization is 
set as java
+        // service config set serialization as null, prefer serialization is 
set as fastjson
+        // in 3.1.x, will use hessian2 serialization
+        // in 3.2.x, will use fastjson serialization
+        exportService(frameworkModel,
+                null,
+                null,
+                JAVA_SERIALIZATION,
+                FASTJSON_SERIALIZATION,
+                "7.0.0");
+        System.out.println("7.0.0 service exported");
+
+        // protocol config set serialization as java, prefer serialization is 
set as fastjson
+        // service config set serialization as null, prefer serialization is 
set as null
+        // in 3.1.x, will use java serialization
+        // in 3.2.x, will use fastjson serialization
+        exportService(frameworkModel,
+                JAVA_SERIALIZATION,
+                null,
+                FASTJSON_SERIALIZATION,
+                null,
+                "8.0.0");
+        System.out.println("8.0.0 service exported");
+
+        // protocol config set serialization as null, prefer serialization is 
set as null
+        // service config set serialization as java, prefer serialization is 
set as fastjson
+        // in 3.1.x, will use java serialization
+        // in 3.2.x, will use fastjson serialization
+        exportService(frameworkModel,
+                JAVA_SERIALIZATION,
+                null,
+                FASTJSON_SERIALIZATION,
+                null,
+                "9.0.0");
+        System.out.println("9.0.0 service exported");
+
+        // protocol config set serialization as fastjson, prefer serialization 
is set as null
+        // service config set serialization as null, prefer serialization is 
set as java
+        // in 3.1.x, will use fastjson serialization
+        // in 3.2.x, will use java serialization
+        exportService(frameworkModel,
+                FASTJSON_SERIALIZATION,
+                null,
+                null,
+                JAVA_SERIALIZATION,
+                "10.0.0");
+        System.out.println("10.0.0 service exported");
+
+        // protocol config set serialization as null, prefer serialization is 
set as fastjson
+        // service config set serialization as java, prefer serialization is 
set as null
+        // in 3.1.x, will use java serialization
+        // in 3.2.x, will use java serialization
+        exportService(frameworkModel,
+                null,
+                JAVA_SERIALIZATION,
+                FASTJSON_SERIALIZATION,
+                null,
+                "11.0.0");
+        System.out.println("11.0.0 service exported");
+
+        // protocol config set serialization as gson, prefer serialization is 
set as fastjson
+        // service config set serialization as java, prefer serialization is 
set as null
+        // in 3.1.x, will use java serialization
+        // in 3.2.x, will use java serialization
+        exportService(frameworkModel,
+                GSON_SERIALIZATION,
+                JAVA_SERIALIZATION,
+                FASTJSON_SERIALIZATION,
+                null,
+                "12.0.0");
+        System.out.println("12.0.0 service exported");
+
+        // protocol config set serialization as gson, prefer serialization is 
set as fastjson
+        // service config set serialization as null, prefer serialization is 
set as java
+        // in 3.1.x, will use gson serialization
+        // in 3.2.x, will use java serialization
+        exportService(frameworkModel,
+                GSON_SERIALIZATION,
+                null,
+                FASTJSON_SERIALIZATION,
+                JAVA_SERIALIZATION,
+                "13.0.0");
+        System.out.println("13.0.0 service exported");
+
+        // protocol config set serialization as gson, prefer serialization is 
set as null
+        // service config set serialization as fastjson, prefer serialization 
is set as java
+        // in 3.1.x, will use fastjson serialization
+        // in 3.2.x, will use java serialization
+        exportService(frameworkModel,
+                GSON_SERIALIZATION,
+                FASTJSON_SERIALIZATION,
+                null,
+                JAVA_SERIALIZATION,
+                "14.0.0");
+        System.out.println("14.0.0 service exported");
+
+        // protocol config set serialization as null, prefer serialization is 
set as gson
+        // service config set serialization as fastjson, prefer serialization 
is set as java
+        // in 3.1.x, will use fastjson serialization
+        // in 3.2.x, will use java serialization
+        exportService(frameworkModel,
+                null,
+                FASTJSON_SERIALIZATION,
+                GSON_SERIALIZATION,
+                JAVA_SERIALIZATION,
+                "15.0.0");
+        System.out.println("15.0.0 service exported");
+
+        // protocol config set serialization as fst, prefer serialization is 
set as gson
+        // service config set serialization as fastjson, prefer serialization 
is set as java
+        // in 3.1.x, will use fastjson serialization
+        // in 3.2.x, will use java serialization
+        exportService(frameworkModel,
+                FST_SERIALIZATION,
+                FASTJSON_SERIALIZATION,
+                GSON_SERIALIZATION,
+                JAVA_SERIALIZATION,
+                "16.0.0");
+        System.out.println("16.0.0 service exported");
+
+        System.out.println("dubbo service started");
+        new CountDownLatch(1).await();
+    }
+
+    private static final AtomicInteger index = new AtomicInteger(0);
+
+    private static void exportService(FrameworkModel frameworkModel,
+                                      String serializationInProtocolConfig,
+                                      String serializationInServiceConfig,
+                                      String 
preferSerializationInProtocolConfig,
+                                      String 
preferSerializationInServiceConfig,
+                                      String serviceVersion) {
+
+        ProtocolConfig protocolConfig = new ProtocolConfig();
+        protocolConfig.setName("dubbo");
+        protocolConfig.setSerialization(serializationInProtocolConfig);
+        
protocolConfig.setPreferSerialization(preferSerializationInProtocolConfig);
+
+        ServiceConfig<DemoService> serviceConfig = new ServiceConfig<>();
+        serviceConfig.setInterface(DemoService.class);
+        serviceConfig.setVersion(serviceVersion);
+        serviceConfig.setRef(new DemoServiceImpl());
+        serviceConfig.setSerialization(serializationInServiceConfig);
+        
serviceConfig.setPreferSerialization(preferSerializationInServiceConfig);
+
+
+        DubboBootstrap bootstrap = 
DubboBootstrap.getInstance(frameworkModel.newApplication());
+        bootstrap.registry(new RegistryConfig("zookeeper://" + 
System.getProperty("zookeeper.address", "127.0.0.1") + ":2181"))
+                .application(new ApplicationConfig("serialization-test-" + 
index.incrementAndGet()))
+                .service(serviceConfig)
+                .protocol(protocolConfig)
+                .start();
+    }
+}
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/src/main/resources/log4j2.xml
 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..69e1321d
--- /dev/null
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/dubbo-samples-prefer-serialization-test-32x-provider/src/main/resources/log4j2.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<Configuration status="WARN">
+    <Appenders>
+        <Console name="Console" target="SYSTEM_OUT" follow="true">
+            <PatternLayout pattern="%style{%d{HH:mm:ss.SSS}}{Magenta} 
%style{|-}{White}%highlight{%-5p} [%t] %style{%40.40c}{Cyan}:%style{%-3L}{Blue} 
%style{-|}{White} 
%m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect)}" 
disableAnsi="false" charset="UTF-8"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Root level="info">
+            <AppenderRef ref="Console"/>
+        </Root>
+    </Loggers>
+</Configuration>
diff --git a/99-integration/dubbo-samples-prefer-serialization-test/pom.xml 
b/99-integration/dubbo-samples-prefer-serialization-test-32x/pom.xml
similarity index 94%
copy from 99-integration/dubbo-samples-prefer-serialization-test/pom.xml
copy to 99-integration/dubbo-samples-prefer-serialization-test-32x/pom.xml
index 11976b31..b798ad72 100644
--- a/99-integration/dubbo-samples-prefer-serialization-test/pom.xml
+++ b/99-integration/dubbo-samples-prefer-serialization-test-32x/pom.xml
@@ -27,7 +27,7 @@
     </parent>
 
     <groupId>org.apache.dubbo</groupId>
-    <artifactId>dubbo-samples-prefer-serialization-test</artifactId>
+    <artifactId>dubbo-samples-prefer-serialization-test-32x</artifactId>
     <version>1.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
@@ -51,16 +51,16 @@
     </properties>
 
     <modules>
-        <module>dubbo-samples-prefer-serialization-test-api</module>
-        <module>dubbo-samples-prefer-serialization-test-consumer</module>
-        <module>dubbo-samples-prefer-serialization-test-provider</module>
+        <module>dubbo-samples-prefer-serialization-test-32x-api</module>
+        <module>dubbo-samples-prefer-serialization-test-32x-consumer</module>
+        <module>dubbo-samples-prefer-serialization-test-32x-provider</module>
     </modules>
 
     <dependencyManagement>
         <dependencies>
             <dependency>
                 <groupId>org.apache.dubbo</groupId>
-                
<artifactId>dubbo-samples-prefer-serialization-test-api</artifactId>
+                
<artifactId>dubbo-samples-prefer-serialization-test-32x-api</artifactId>
                 <version>${project.version}</version>
             </dependency>
 
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test/case-versions.conf 
b/99-integration/dubbo-samples-prefer-serialization-test/case-versions.conf
index 56b50b22..47865444 100644
--- a/99-integration/dubbo-samples-prefer-serialization-test/case-versions.conf
+++ b/99-integration/dubbo-samples-prefer-serialization-test/case-versions.conf
@@ -20,6 +20,6 @@
 # Supported component versions of the test case
 
 # Spring app
-dubbo.version=[ >= 3.2.0 ]
+dubbo.version=[ >= 3.3.0 ]
 spring.version=4.*, 5.*
 java.version= [>= 8]
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-consumer/pom.xml
 
b/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-consumer/pom.xml
index 607ee638..923e3e30 100644
--- 
a/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-consumer/pom.xml
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-consumer/pom.xml
@@ -50,6 +50,11 @@
             <artifactId>dubbo-serialization-gson</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.dubbo.extensions</groupId>
+            <artifactId>dubbo-serialization-jdk</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.dubbo.extensions</groupId>
             <artifactId>dubbo-serialization-fst</artifactId>
diff --git 
a/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-provider/pom.xml
 
b/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-provider/pom.xml
index e84b157c..415dbc01 100644
--- 
a/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-provider/pom.xml
+++ 
b/99-integration/dubbo-samples-prefer-serialization-test/dubbo-samples-prefer-serialization-test-provider/pom.xml
@@ -50,6 +50,11 @@
             <artifactId>dubbo-serialization-gson</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.dubbo.extensions</groupId>
+            <artifactId>dubbo-serialization-jdk</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.dubbo.extensions</groupId>
             <artifactId>dubbo-serialization-fst</artifactId>
diff --git a/99-integration/dubbo-samples-prefer-serialization-test/pom.xml 
b/99-integration/dubbo-samples-prefer-serialization-test/pom.xml
index 11976b31..140e20cf 100644
--- a/99-integration/dubbo-samples-prefer-serialization-test/pom.xml
+++ b/99-integration/dubbo-samples-prefer-serialization-test/pom.xml
@@ -41,8 +41,9 @@
 
         <dubbo.version>3.2.6</dubbo.version>
         
<dubbo-serialization-fastjson.version>1.0.1</dubbo-serialization-fastjson.version>
-        
<dubbo-serialization-gson.version>1.0.1</dubbo-serialization-gson.version>
+        
<dubbo-serialization-gson.version>3.3.0</dubbo-serialization-gson.version>
         
<dubbo-serialization-fst.version>1.0.1</dubbo-serialization-fst.version>
+        
<dubbo-serialization-java.version>1.0.1</dubbo-serialization-java.version>
         <spring.version>4.3.30.RELEASE</spring.version>
         <log4j2.version>2.20.0</log4j2.version>
         <junit.version>4.13.1</junit.version>
@@ -129,6 +130,12 @@
                 <version>${dubbo-serialization-gson.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>org.apache.dubbo.extensions</groupId>
+                <artifactId>dubbo-serialization-jdk</artifactId>
+                <version>${dubbo-serialization-gson.version}</version>
+            </dependency>
+
             <dependency>
                 <groupId>org.apache.dubbo.extensions</groupId>
                 <artifactId>dubbo-serialization-fst</artifactId>
diff --git a/99-integration/dubbo-samples-test-13441-3/pom.xml 
b/99-integration/dubbo-samples-test-13441-3/pom.xml
index 07e71bfc..404b6517 100644
--- a/99-integration/dubbo-samples-test-13441-3/pom.xml
+++ b/99-integration/dubbo-samples-test-13441-3/pom.xml
@@ -39,7 +39,7 @@
         <maven.compiler.target>1.8</maven.compiler.target>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-        <dubbo.version>3.2.10-SNAPSHOT</dubbo.version>
+        <dubbo.version>3.2.10</dubbo.version>
         <junit.version>4.13.1</junit.version>
         <gson_version>2.10.1</gson_version>
 
diff --git a/99-integration/dubbo-samples-test-13441-4/pom.xml 
b/99-integration/dubbo-samples-test-13441-4/pom.xml
index d6f4a398..4e059128 100644
--- a/99-integration/dubbo-samples-test-13441-4/pom.xml
+++ b/99-integration/dubbo-samples-test-13441-4/pom.xml
@@ -39,7 +39,7 @@
         <maven.compiler.target>1.8</maven.compiler.target>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-        <dubbo.version>3.2.10-SNAPSHOT</dubbo.version>
+        <dubbo.version>3.2.10</dubbo.version>
         <junit.version>4.13.1</junit.version>
         <gson_version>2.10.1</gson_version>
 
diff --git a/99-integration/dubbo-samples-test-13441-5/pom.xml 
b/99-integration/dubbo-samples-test-13441-5/pom.xml
index 162e4304..1a196895 100644
--- a/99-integration/dubbo-samples-test-13441-5/pom.xml
+++ b/99-integration/dubbo-samples-test-13441-5/pom.xml
@@ -39,7 +39,7 @@
         <maven.compiler.target>1.8</maven.compiler.target>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-        <dubbo.version>3.2.10-SNAPSHOT</dubbo.version>
+        <dubbo.version>3.2.10</dubbo.version>
         <junit.version>4.13.1</junit.version>
         <gson_version>2.10.1</gson_version>
 
diff --git a/99-integration/dubbo-samples-test-13441-6/pom.xml 
b/99-integration/dubbo-samples-test-13441-6/pom.xml
index 39c29827..9a7ea483 100644
--- a/99-integration/dubbo-samples-test-13441-6/pom.xml
+++ b/99-integration/dubbo-samples-test-13441-6/pom.xml
@@ -39,7 +39,7 @@
         <maven.compiler.target>1.8</maven.compiler.target>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-        <dubbo.version>3.2.10-SNAPSHOT</dubbo.version>
+        <dubbo.version>3.2.10</dubbo.version>
         <junit.version>4.13.1</junit.version>
         <gson_version>2.10.1</gson_version>
 
diff --git a/99-integration/dubbo-samples-test-13441-7/pom.xml 
b/99-integration/dubbo-samples-test-13441-7/pom.xml
index 739f0a7e..48e4fff6 100644
--- a/99-integration/dubbo-samples-test-13441-7/pom.xml
+++ b/99-integration/dubbo-samples-test-13441-7/pom.xml
@@ -39,7 +39,7 @@
         <maven.compiler.target>1.8</maven.compiler.target>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-        <dubbo.version>3.2.10-SNAPSHOT</dubbo.version>
+        <dubbo.version>3.2.10</dubbo.version>
         <junit.version>4.13.1</junit.version>
         <gson_version>2.10.1</gson_version>
 
diff --git a/99-integration/pom.xml b/99-integration/pom.xml
index 55e2f240..eca6a96b 100644
--- a/99-integration/pom.xml
+++ b/99-integration/pom.xml
@@ -44,6 +44,7 @@
         <module>dubbo-samples-port-unification-netty3</module>
         <module>dubbo-samples-prefer-serialization-test</module>
         <module>dubbo-samples-prefer-serialization-test-31x</module>
+        <module>dubbo-samples-prefer-serialization-test-32x</module>
         <module>dubbo-samples-registry-test-curator</module>
         <module>dubbo-samples-registry-test-curator-interface</module>
         <module>dubbo-samples-registry-test-curator-instance</module>

Reply via email to