Skip to content

Commit

Permalink
Merge branch '3.3' into 3.3-new-metadata-service-stub
Browse files Browse the repository at this point in the history
namelessssssssssss authored Jun 23, 2024
2 parents 9d855c6 + 4829be3 commit c99eb72
Showing 12 changed files with 133 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-scheduled-3.3.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8
java-version: 21
- uses: actions/cache@v3
name: "Cache local Maven repository"
with:
2 changes: 1 addition & 1 deletion dubbo-demo/dubbo-demo-spring-boot/pom.xml
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@
<skip_maven_deploy>true</skip_maven_deploy>
<spring-boot.version>2.7.18</spring-boot.version>
<spring-boot-maven-plugin.version>2.7.18</spring-boot-maven-plugin.version>
<micrometer-core.version>1.13.0</micrometer-core.version>
<micrometer-core.version>1.13.1</micrometer-core.version>
</properties>

<dependencyManagement>
12 changes: 6 additions & 6 deletions dubbo-dependencies-bom/pom.xml
Original file line number Diff line number Diff line change
@@ -90,12 +90,12 @@
<properties>
<!-- Common libs -->
<!-- <spring_version>4.3.30.RELEASE</spring_version> -->
<spring_version>5.3.36</spring_version>
<spring_version>5.3.37</spring_version>
<spring_security_version>5.8.12</spring_security_version>
<javassist_version>3.30.2-GA</javassist_version>
<byte-buddy_version>1.14.17</byte-buddy_version>
<netty_version>3.2.10.Final</netty_version>
<netty4_version>4.1.110.Final</netty4_version>
<netty4_version>4.1.111.Final</netty4_version>
<netty_http3_version>0.0.28.Final</netty_http3_version>
<httpclient_version>4.5.14</httpclient_version>
<httpcore_version>4.4.16</httpcore_version>
@@ -121,14 +121,14 @@
<snakeyaml_version>2.2</snakeyaml_version>
<commons_lang3_version>3.14.0</commons_lang3_version>
<envoy_api_version>0.1.35</envoy_api_version>
<micrometer.version>1.13.0</micrometer.version>
<micrometer.version>1.13.1</micrometer.version>
<opentelemetry.version>1.39.0</opentelemetry.version>
<zipkin-reporter.version>3.4.0</zipkin-reporter.version>
<micrometer-tracing.version>1.3.0</micrometer-tracing.version>
<micrometer-tracing.version>1.3.1</micrometer-tracing.version>
<t_digest.version>3.3</t_digest.version>
<prometheus_client.version>0.16.0</prometheus_client.version>
<reactive.version>1.0.4</reactive.version>
<reactor.version>3.6.6</reactor.version>
<reactor.version>3.6.7</reactor.version>
<rxjava.version>2.2.21</rxjava.version>
<okhttp_version>3.14.9</okhttp_version>

@@ -186,7 +186,7 @@
<spotless.action>check</spotless.action>
<dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
<palantirJavaFormat.version>2.38.0</palantirJavaFormat.version>
<revision>3.3.0-beta.4-SNAPSHOT</revision>
<revision>3.3.0-beta.5-SNAPSHOT</revision>
<open_feign_version>3.1.5</open_feign_version>
<jakarta.xml.bind-api.version>4.0.1</jakarta.xml.bind-api.version>
<jaxb-runtime.version>2.3.3-b02</jaxb-runtime.version>
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@
<packaging>pom</packaging>

<properties>
<revision>3.3.0-beta.4-SNAPSHOT</revision>
<revision>3.3.0-beta.5-SNAPSHOT</revision>
<maven_flatten_version>1.6.0</maven_flatten_version>
<slf4j_version>1.7.36</slf4j_version>
<curator5_version>5.1.0</curator5_version>
104 changes: 56 additions & 48 deletions dubbo-plugin/dubbo-triple-servlet/pom.xml
Original file line number Diff line number Diff line change
@@ -56,52 +56,60 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>copy-sources</id>
<goals>
<goal>run</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<target>
<copy overwrite="true" todir="${sources_directory}">
<fileset dir="src/main/java/org/apache/dubbo/rpc/protocol/tri/servlet" />
</copy>
<replace token="tri.servlet;" value="tri.servlet.jakarta;">
<fileset dir="${sources_directory}" />
</replace>
<replace token="javax.servlet" value="jakarta.servlet">
<fileset dir="${sources_directory}" />
</replace>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-sources</id>
<goals>
<goal>add-source</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jdk-version-ge-17</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>copy-sources</id>
<goals>
<goal>run</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<target>
<copy overwrite="true" todir="${sources_directory}">
<fileset dir="src/main/java/org/apache/dubbo/rpc/protocol/tri/servlet" />
</copy>
<replace token="tri.servlet;" value="tri.servlet.jakarta;">
<fileset dir="${sources_directory}" />
</replace>
<replace token="javax.servlet" value="jakarta.servlet">
<fileset dir="${sources_directory}" />
</replace>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-sources</id>
<goals>
<goal>add-source</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@
import org.apache.dubbo.rpc.RpcContext;
import org.apache.dubbo.rpc.RpcException;
import org.apache.dubbo.rpc.RpcInvocation;
import org.apache.dubbo.rpc.model.ConsumerModel;
import org.apache.dubbo.rpc.model.MethodDescriptor;
import org.apache.dubbo.rpc.model.ServiceModel;
import org.apache.dubbo.rpc.protocol.AbstractInvoker;
@@ -318,11 +319,18 @@ private Object rebuildValue(Invocation invocation, Invoker<?> invoker, Object or
}

Object value = originValue;
ClassLoader cl = Thread.currentThread().getContextClassLoader();
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
try {
ServiceModel consumerServiceModel = getUrl().getServiceModel();
if (consumerServiceModel != null) {
Thread.currentThread().setContextClassLoader(consumerServiceModel.getClassLoader());
// 1. By default, the classloader of the current Thread is the consumer class loader.
ClassLoader consumerClassLoader = contextClassLoader;
ServiceModel serviceModel = getUrl().getServiceModel();
// 2. If there is a ConsumerModel in the url, the classloader of the ConsumerModel is consumerLoader
if (Objects.nonNull(serviceModel) && serviceModel instanceof ConsumerModel) {
consumerClassLoader = serviceModel.getClassLoader();
}
// 3. request result copy
if (Objects.nonNull(consumerClassLoader)) {
Thread.currentThread().setContextClassLoader(consumerClassLoader);
Type[] returnTypes = RpcUtils.getReturnTypes(invocation);
if (returnTypes == null) {
return originValue;
@@ -335,7 +343,7 @@ private Object rebuildValue(Invocation invocation, Invoker<?> invoker, Object or
}
return value;
} finally {
Thread.currentThread().setContextClassLoader(cl);
Thread.currentThread().setContextClassLoader(contextClassLoader);
}
}

45 changes: 45 additions & 0 deletions dubbo-spring-boot/dubbo-spring-boot-3-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
@@ -66,4 +66,49 @@
<optional>true</optional>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>**</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<skipMain>true</skipMain>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>jdk-version-ge-17</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<skipMain>false</skipMain>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@
</modules>

<properties>
<micrometer.version>1.13.0</micrometer.version>
<micrometer-tracing.version>1.3.0</micrometer-tracing.version>
<micrometer.version>1.13.1</micrometer.version>
<micrometer-tracing.version>1.3.1</micrometer-tracing.version>
<opentelemetry.version>1.39.0</opentelemetry.version>
<zipkin-reporter.version>3.4.0</zipkin-reporter.version>
<prometheus-client.version>0.16.0</prometheus-client.version>
2 changes: 1 addition & 1 deletion dubbo-test/dubbo-test-spring3.2/pom.xml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@

<properties>
<skip_maven_deploy>true</skip_maven_deploy>
<spring_version>5.3.36</spring_version>
<spring_version>5.3.37</spring_version>
</properties>

<dependencyManagement>
2 changes: 1 addition & 1 deletion dubbo-test/dubbo-test-spring4.1/pom.xml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@

<properties>
<skip_maven_deploy>true</skip_maven_deploy>
<spring_version>5.3.36</spring_version>
<spring_version>5.3.37</spring_version>
</properties>

<dependencyManagement>
2 changes: 1 addition & 1 deletion dubbo-test/dubbo-test-spring4.2/pom.xml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@

<properties>
<skip_maven_deploy>true</skip_maven_deploy>
<spring_version>5.3.36</spring_version>
<spring_version>5.3.37</spring_version>
</properties>

<dependencyManagement>
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -130,8 +130,8 @@

<!-- Maven plugins -->
<maven_jar_version>3.4.1</maven_jar_version>
<maven_surefire_version>3.2.5</maven_surefire_version>
<maven_failsafe_version>3.2.5</maven_failsafe_version>
<maven_surefire_version>3.3.0</maven_surefire_version>
<maven_failsafe_version>3.3.0</maven_failsafe_version>
<maven_deploy_version>2.8.2</maven_deploy_version>
<maven_compiler_version>3.13.0</maven_compiler_version>
<maven_source_version>3.3.1</maven_source_version>
@@ -152,7 +152,7 @@
<dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
<palantirJavaFormat.version>2.38.0</palantirJavaFormat.version>

<revision>3.3.0-beta.4-SNAPSHOT</revision>
<revision>3.3.0-beta.5-SNAPSHOT</revision>
</properties>

<dependencyManagement>
@@ -255,7 +255,7 @@
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<version>3.7.0</version>
</plugin>
<plugin>
<!-- Do NOT upgrade -->
@@ -410,7 +410,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>

0 comments on commit c99eb72

Please sign in to comment.