httpMethods = pathMatcherToHttpMethodMap.get(newPathMatcher);
+
+ return httpMethods.toString();
+
+ }
+
}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestRPCInvocationUtil.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestRPCInvocationUtil.java
index 5acfc98998..b3205d55ec 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestRPCInvocationUtil.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestRPCInvocationUtil.java
@@ -23,7 +23,6 @@ import org.apache.dubbo.metadata.rest.ArgInfo;
import org.apache.dubbo.metadata.rest.PathMatcher;
import org.apache.dubbo.metadata.rest.RestMethodMetadata;
import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.RpcContext;
import org.apache.dubbo.rpc.RpcInvocation;
import org.apache.dubbo.rpc.protocol.rest.annotation.ParamParserManager;
import org.apache.dubbo.rpc.protocol.rest.annotation.param.parse.provider.ProviderParseContext;
@@ -39,9 +38,6 @@ import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
-import static org.apache.dubbo.common.constants.CommonConstants.SERVICE_DEPLOYER_ATTRIBUTE_KEY;
-
-
public class RestRPCInvocationUtil {
private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(RestRPCInvocationUtil.class);
@@ -142,13 +138,8 @@ public class RestRPCInvocationUtil {
* @param pathMatcher
* @return
*/
- public static InvokerAndRestMethodMetadataPair getRestMethodMetadataAndInvokerPair(PathMatcher pathMatcher) {
+ public static InvokerAndRestMethodMetadataPair getRestMethodMetadataAndInvokerPair(PathMatcher pathMatcher, ServiceDeployer serviceDeployer) {
- ServiceDeployer serviceDeployer = (ServiceDeployer) RpcContext.getServiceContext().getObjectAttachment(SERVICE_DEPLOYER_ATTRIBUTE_KEY);
-
- if (serviceDeployer == null) {
- return null;
- }
return serviceDeployer.getPathAndInvokerMapper().getRestMethodMetadata(pathMatcher);
}
@@ -164,7 +155,7 @@ public class RestRPCInvocationUtil {
PathMatcher pathMather = createPathMatcher(request);
- return getRestMethodMetadataAndInvokerPair(pathMather);
+ return getRestMethodMetadataAndInvokerPair(pathMather, request.getServiceDeployer());
}
@@ -179,20 +170,20 @@ public class RestRPCInvocationUtil {
PathMatcher pathMatcher = createPathMatcher(request);
- return getInvoker(pathMatcher);
+ return getInvoker(pathMatcher, request.getServiceDeployer());
}
/**
* get invoker by service method
- *
+ *
* compare method`s name,param types
*
* @param serviceMethod
* @return
*/
- public static Invoker getInvokerByServiceInvokeMethod(Method serviceMethod) {
+ public static Invoker getInvokerByServiceInvokeMethod(Method serviceMethod, ServiceDeployer serviceDeployer) {
if (serviceMethod == null) {
return null;
@@ -200,7 +191,7 @@ public class RestRPCInvocationUtil {
PathMatcher pathMatcher = PathMatcher.getInvokeCreatePathMatcher(serviceMethod);
- InvokerAndRestMethodMetadataPair pair = getRestMethodMetadataAndInvokerPair(pathMatcher);
+ InvokerAndRestMethodMetadataPair pair = getRestMethodMetadataAndInvokerPair(pathMatcher, serviceDeployer);
if (pair == null) {
return null;
@@ -215,8 +206,8 @@ public class RestRPCInvocationUtil {
* @param pathMatcher
* @return
*/
- public static Invoker getInvoker(PathMatcher pathMatcher) {
- InvokerAndRestMethodMetadataPair pair = getRestMethodMetadataAndInvokerPair(pathMatcher);
+ public static Invoker getInvoker(PathMatcher pathMatcher, ServiceDeployer serviceDeployer) {
+ InvokerAndRestMethodMetadataPair pair = getRestMethodMetadataAndInvokerPair(pathMatcher, serviceDeployer);
if (pair == null) {
return null;
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/deploy/ServiceDeployer.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/deploy/ServiceDeployer.java
index 0c75ba5bfb..1830dc2e86 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/deploy/ServiceDeployer.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/deploy/ServiceDeployer.java
@@ -144,4 +144,15 @@ public class ServiceDeployer {
}
+ public boolean isMethodAllowed(PathMatcher pathMatcher) {
+ return pathAndInvokerMapper.isHttpMethodAllowed(pathMatcher);
+ }
+
+ public boolean hashRestMethod(PathMatcher pathMatcher) {
+ return pathAndInvokerMapper.getRestMethodMetadata(pathMatcher) != null;
+ }
+
+ public String pathHttpMethods(PathMatcher pathMatcher) {
+ return pathAndInvokerMapper.pathHttpMethods(pathMatcher);
+ }
}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/DubboBuiltResponse.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/DubboBuiltResponse.java
new file mode 100644
index 0000000000..1a034c2891
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/DubboBuiltResponse.java
@@ -0,0 +1,54 @@
+/*
+ * 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.rpc.protocol.rest.extension.resteasy.filter;
+
+import org.jboss.resteasy.specimpl.BuiltResponse;
+
+/**
+ * wrapper resteasy BuiltResponse
+ */
+public class DubboBuiltResponse extends BuiltResponse {
+
+ // user reset entity
+ private boolean resetEntity;
+
+ public DubboBuiltResponse(Object entity, int status, Class> entityClass) {
+
+ this.entity = entity;
+ this.entityClass = entityClass;
+ this.status = status;
+ }
+
+
+ @Override
+ public void setEntity(Object entity) {
+ if (entity == null) {
+ return;
+ }
+
+ if (entity.equals(this.entity)) {
+ return;
+ }
+ // reset entity true
+ this.resetEntity = true;
+ super.setEntity(entity);
+ }
+
+ public boolean isResetEntity() {
+ return resetEntity;
+ }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/ResteasyResponseContainerFilterAdapter.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/ResteasyResponseContainerFilterAdapter.java
index bdee7cd9b2..c6af847ece 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/ResteasyResponseContainerFilterAdapter.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/ResteasyResponseContainerFilterAdapter.java
@@ -24,7 +24,6 @@ import org.apache.dubbo.rpc.protocol.rest.filter.RestResponseFilter;
import org.apache.dubbo.rpc.protocol.rest.filter.context.RestFilterContext;
import org.apache.dubbo.rpc.protocol.rest.netty.NettyHttpResponse;
import org.apache.dubbo.rpc.protocol.rest.request.RequestFacade;
-import org.jboss.resteasy.specimpl.BuiltResponse;
import org.jboss.resteasy.spi.HttpResponse;
import javax.ws.rs.container.ContainerResponseFilter;
@@ -50,16 +49,18 @@ public class ResteasyResponseContainerFilterAdapter implements RestResponseFilte
// response filter entity first
- // empty jaxrsResponse
- BuiltResponse jaxrsResponse = new BuiltResponse();
+ // build jaxrsResponse from rest netty response
+ DubboBuiltResponse dubboBuiltResponse = new DubboBuiltResponse(response.getResponseBody(), response.getStatus(), response.getEntityClass());
// NettyHttpResponse wrapper
HttpResponse httpResponse = new ResteasyNettyHttpResponse(response);
- DubboContainerResponseContextImpl containerResponseContext = createContainerResponseContext(requestFacade, httpResponse, jaxrsResponse, containerRequestFilters.toArray(new ContainerResponseFilter[0]));
+ DubboContainerResponseContextImpl containerResponseContext = createContainerResponseContext(requestFacade, httpResponse, dubboBuiltResponse, containerRequestFilters.toArray(new ContainerResponseFilter[0]));
containerResponseContext.filter();
- if (jaxrsResponse.getEntity() != null) {
+
+ // user reset entity
+ if (dubboBuiltResponse.hasEntity() && dubboBuiltResponse.isResetEntity()) {
// clean output stream data
restOutputStream(response);
- writeResteasyResponse(url, requestFacade, response, jaxrsResponse);
+ writeResteasyResponse(url, requestFacade, response, dubboBuiltResponse);
}
addResponseHeaders(response, httpResponse.getOutputHeaders());
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/filter/ServiceInvokeRestFilter.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/filter/ServiceInvokeRestFilter.java
index 0381b911bd..404f8edd5a 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/filter/ServiceInvokeRestFilter.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/filter/ServiceInvokeRestFilter.java
@@ -22,6 +22,7 @@ import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
+import org.apache.dubbo.metadata.rest.PathMatcher;
import org.apache.dubbo.metadata.rest.RestMethodMetadata;
import org.apache.dubbo.metadata.rest.media.MediaType;
import org.apache.dubbo.rpc.Invoker;
@@ -72,26 +73,28 @@ public class ServiceInvokeRestFilter implements RestRequestFilter {
RequestFacade request,
URL url,
ServiceDeployer serviceDeployer) throws Exception {
- // acquire metadata by request
- InvokerAndRestMethodMetadataPair restMethodMetadataPair = RestRPCInvocationUtil.getRestMethodMetadataAndInvokerPair(request);
+ PathMatcher pathMatcher = RestRPCInvocationUtil.createPathMatcher(request);
// path NoFound 404
- if (restMethodMetadataPair == null) {
- throw new PathNoFoundException("rest service Path no found, current path info:" + RestRPCInvocationUtil.createPathMatcher(request));
+ if (!serviceDeployer.hashRestMethod(pathMatcher)) {
+ throw new PathNoFoundException("rest service Path no found, current path info:" + pathMatcher);
}
- Invoker invoker = restMethodMetadataPair.getInvoker();
-
- RestMethodMetadata restMethodMetadata = restMethodMetadataPair.getRestMethodMetadata();
// method disallowed
- if (!restMethodMetadata.getRequest().methodAllowed(request.getMethod())) {
+ if (!serviceDeployer.isMethodAllowed(pathMatcher)) {
nettyHttpResponse.sendError(405, "service require request method is : "
- + restMethodMetadata.getRequest().getMethod()
+ + serviceDeployer.pathHttpMethods(pathMatcher)
+ ", but current request method is: " + request.getMethod()
);
return;
}
+ // compare http method and acquire metadata by request
+ InvokerAndRestMethodMetadataPair restMethodMetadataPair = RestRPCInvocationUtil.getRestMethodMetadataAndInvokerPair(pathMatcher.compareHttpMethod(true), serviceDeployer);
+
+ Invoker invoker = restMethodMetadataPair.getInvoker();
+
+ RestMethodMetadata restMethodMetadata = restMethodMetadataPair.getRestMethodMetadata();
// content-type support judge,throw unSupportException
@@ -106,6 +109,9 @@ public class ServiceInvokeRestFilter implements RestRequestFilter {
// execute business method invoke
Result result = invoker.invoke(rpcInvocation);
+ // set raw response
+ nettyHttpResponse.setResponseBody(result.getValue());
+
if (result.hasException()) {
Throwable exception = result.getException();
logger.error("", exception.getMessage(), "", "dubbo rest protocol provider Invoker invoke error", exception);
@@ -150,7 +156,8 @@ public class ServiceInvokeRestFilter implements RestRequestFilter {
public static void writeResult(NettyHttpResponse nettyHttpResponse, URL url, Object value, Class> returnType, MediaType mediaType) throws Exception {
MessageCodecResultPair booleanMediaTypePair = HttpMessageCodecManager.httpMessageEncode(nettyHttpResponse.getOutputStream(), value, url, mediaType, returnType);
-
+ // reset raw response result
+ nettyHttpResponse.setResponseBody(value);
nettyHttpResponse.addOutputHeaders(RestHeaderEnum.CONTENT_TYPE.getHeader(), booleanMediaTypePair.getMediaType().value);
}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/handler/NettyHttpHandler.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/handler/NettyHttpHandler.java
index b179cc939e..e24207b792 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/handler/NettyHttpHandler.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/handler/NettyHttpHandler.java
@@ -38,8 +38,6 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import static org.apache.dubbo.common.constants.CommonConstants.SERVICE_DEPLOYER_ATTRIBUTE_KEY;
-
/**
* netty http request handler
@@ -76,8 +74,6 @@ public class NettyHttpHandler implements HttpHandler restFilters) throws Exception {
RestFilterContext restFilterContext = new RestFilterContext(url, requestFacade, nettyHttpResponse, serviceDeployer);
- for (RestFilter restResponseFilter : restFilters) {
- restResponseFilter.filter(restFilterContext);
+ for (RestFilter restFilter : restFilters) {
+ restFilter.filter(restFilterContext);
if (restFilterContext.complete()) {
break;
}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/ChunkOutputStream.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/ChunkOutputStream.java
index 53db275b7d..0e9d9bb904 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/ChunkOutputStream.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/ChunkOutputStream.java
@@ -21,6 +21,7 @@ import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.DefaultHttpContent;
+import org.apache.dubbo.remoting.transport.ExceedPayloadLimitException;
import java.io.IOException;
import java.io.OutputStream;
@@ -29,27 +30,32 @@ public class ChunkOutputStream extends OutputStream {
final ByteBuf buffer;
final ChannelHandlerContext ctx;
final NettyHttpResponse response;
+ int chunkSize = 0;
- ChunkOutputStream(final NettyHttpResponse response, final ChannelHandlerContext ctx, final int chunksize) {
+ ChunkOutputStream(final NettyHttpResponse response, final ChannelHandlerContext ctx, final int chunkSize) {
this.response = response;
- if (chunksize < 1) {
+ if (chunkSize < 1) {
throw new IllegalArgumentException();
}
- // TODO buffer pool
- this.buffer = Unpooled.buffer(0, chunksize);
+ this.buffer = Unpooled.buffer(0, chunkSize);
+ this.chunkSize = chunkSize;
this.ctx = ctx;
}
@Override
public void write(int b) throws IOException {
if (buffer.maxWritableBytes() < 1) {
- flush();
+ throwExceedPayloadLimitException(buffer.readableBytes() + 1);
}
buffer.writeByte(b);
}
- public void reset()
- {
+ private void throwExceedPayloadLimitException(int dataSize) throws ExceedPayloadLimitException {
+ throw new ExceedPayloadLimitException(
+ "Data length too large: " + dataSize + ", max payload: " + chunkSize);
+ }
+
+ public void reset() {
if (response.isCommitted()) throw new IllegalStateException();
buffer.clear();
}
@@ -65,16 +71,10 @@ public class ChunkOutputStream extends OutputStream {
public void write(byte[] b, int off, int len) throws IOException {
int dataLengthLeftToWrite = len;
int dataToWriteOffset = off;
- int spaceLeftInCurrentChunk;
- while ((spaceLeftInCurrentChunk = buffer.maxWritableBytes()) < dataLengthLeftToWrite) {
- buffer.writeBytes(b, dataToWriteOffset, spaceLeftInCurrentChunk);
- dataToWriteOffset = dataToWriteOffset + spaceLeftInCurrentChunk;
- dataLengthLeftToWrite = dataLengthLeftToWrite - spaceLeftInCurrentChunk;
- flush();
- }
- if (dataLengthLeftToWrite > 0) {
- buffer.writeBytes(b, dataToWriteOffset, dataLengthLeftToWrite);
+ if (buffer.maxWritableBytes() < dataLengthLeftToWrite) {
+ throwExceedPayloadLimitException(buffer.readableBytes() + len);
}
+ buffer.writeBytes(b, dataToWriteOffset, dataLengthLeftToWrite);
}
@Override
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/NettyHttpResponse.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/NettyHttpResponse.java
index c092907f3f..4ed2c5525b 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/NettyHttpResponse.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/NettyHttpResponse.java
@@ -27,7 +27,9 @@ import io.netty.handler.codec.http.HttpHeaders.Names;
import io.netty.handler.codec.http.HttpMethod;
import io.netty.handler.codec.http.HttpResponseStatus;
import io.netty.handler.codec.http.LastHttpContent;
+import org.apache.dubbo.common.URL;
import org.apache.dubbo.metadata.rest.media.MediaType;
+import org.apache.dubbo.remoting.Constants;
import org.apache.dubbo.rpc.protocol.rest.RestHeaderEnum;
@@ -54,16 +56,19 @@ public class NettyHttpResponse implements HttpResponse {
private boolean committed;
private boolean keepAlive;
private HttpMethod method;
+ // raw response body
+ private Object responseBody;
+ // raw response class
+ private Class> entityClass;
- public NettyHttpResponse(final ChannelHandlerContext ctx, final boolean keepAlive) {
- this(ctx, keepAlive, null);
+ public NettyHttpResponse(final ChannelHandlerContext ctx, final boolean keepAlive, URL url) {
+ this(ctx, keepAlive, null, url);
}
- public NettyHttpResponse(final ChannelHandlerContext ctx, final boolean keepAlive, final HttpMethod method) {
+ public NettyHttpResponse(final ChannelHandlerContext ctx, final boolean keepAlive, HttpMethod method, URL url) {
outputHeaders = new HashMap<>();
this.method = method;
- // TODO chunk size to config
- os = new ChunkOutputStream(this, ctx, 1000);
+ os = new ChunkOutputStream(this, ctx, url.getParameter(Constants.PAYLOAD_KEY, Constants.DEFAULT_PAYLOAD));
this.ctx = ctx;
this.keepAlive = keepAlive;
}
@@ -105,6 +110,7 @@ public class NettyHttpResponse implements HttpResponse {
@Override
public void sendError(int status, String message) throws IOException {
setStatus(status);
+ setResponseBody(message);
if (message != null) {
getOutputStream().write(message.getBytes(StandardCharsets.UTF_8));
}
@@ -211,4 +217,21 @@ public class NettyHttpResponse implements HttpResponse {
}
}
+
+ public Object getResponseBody() {
+ return responseBody;
+ }
+
+ public void setResponseBody(Object responseBody) {
+
+ this.responseBody = responseBody;
+
+ if (responseBody != null) {
+ this.entityClass = responseBody.getClass();
+ }
+ }
+
+ public Class> getEntityClass() {
+ return entityClass;
+ }
}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/RestHttpRequestDecoder.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/RestHttpRequestDecoder.java
index 311beaa451..d5233c3e10 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/RestHttpRequestDecoder.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/RestHttpRequestDecoder.java
@@ -28,12 +28,15 @@ import io.netty.handler.codec.http.HttpHeaders;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
-import org.apache.dubbo.common.threadpool.ThreadPool;
+import org.apache.dubbo.common.threadpool.manager.ExecutorRepository;
+import org.apache.dubbo.common.utils.ExecutorUtil;
import org.apache.dubbo.rpc.protocol.rest.RestHeaderEnum;
import org.apache.dubbo.rpc.protocol.rest.deploy.ServiceDeployer;
import org.apache.dubbo.rpc.protocol.rest.handler.NettyHttpHandler;
import org.apache.dubbo.rpc.protocol.rest.request.NettyRequestFacade;
+import static org.apache.dubbo.config.Constants.SERVER_THREAD_POOL_NAME;
+
public class RestHttpRequestDecoder extends MessageToMessageDecoder {
private final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(getClass());
@@ -48,7 +51,7 @@ public class RestHttpRequestDecoder extends MessageToMessageDecoder out) throws Exception {
boolean keepAlive = HttpHeaders.isKeepAlive(request);
- NettyHttpResponse nettyHttpResponse = new NettyHttpResponse(ctx, keepAlive);
- NettyRequestFacade requestFacade = new NettyRequestFacade(request, ctx);
+ NettyHttpResponse nettyHttpResponse = new NettyHttpResponse(ctx, keepAlive,url);
+ NettyRequestFacade requestFacade = new NettyRequestFacade(request, ctx,serviceDeployer);
executor.execute(() -> {
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/request/NettyRequestFacade.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/request/NettyRequestFacade.java
index 3c24717048..006b404766 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/request/NettyRequestFacade.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/request/NettyRequestFacade.java
@@ -23,6 +23,7 @@ import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.HttpContent;
import org.apache.dubbo.common.utils.IOUtils;
+import org.apache.dubbo.rpc.protocol.rest.deploy.ServiceDeployer;
import java.io.IOException;
import java.util.ArrayList;
@@ -48,6 +49,12 @@ public class NettyRequestFacade extends RequestFacade {
}
+ public NettyRequestFacade(Object request, ChannelHandlerContext context, ServiceDeployer serviceDeployer) {
+ super((FullHttpRequest) request, serviceDeployer);
+ this.context = context;
+
+ }
+
protected void initHeaders() {
for (Map.Entry header : request.headers()) {
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/request/RequestFacade.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/request/RequestFacade.java
index 8d95ac60cb..ab0dcbf484 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/request/RequestFacade.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/request/RequestFacade.java
@@ -18,6 +18,7 @@ package org.apache.dubbo.rpc.protocol.rest.request;
import org.apache.dubbo.common.utils.StringUtils;
+import org.apache.dubbo.rpc.protocol.rest.deploy.ServiceDeployer;
import java.io.IOException;
import java.util.ArrayList;
@@ -37,6 +38,7 @@ public abstract class RequestFacade {
protected String path;
protected T request;
protected byte[] body = new byte[0];
+ protected ServiceDeployer serviceDeployer;
public RequestFacade(T request) {
this.request = request;
@@ -45,6 +47,11 @@ public abstract class RequestFacade {
parseBody();
}
+ public RequestFacade(T request, ServiceDeployer serviceDeployer) {
+ this(request);
+ this.serviceDeployer = serviceDeployer;
+ }
+
protected void initHeaders() {
}
@@ -131,5 +138,7 @@ public abstract class RequestFacade {
protected abstract void parseBody();
-
+ public ServiceDeployer getServiceDeployer() {
+ return serviceDeployer;
+ }
}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/test/java/org/apache/dubbo/rpc/protocol/rest/JaxrsRestProtocolTest.java b/dubbo-rpc/dubbo-rpc-rest/src/test/java/org/apache/dubbo/rpc/protocol/rest/JaxrsRestProtocolTest.java
index 8248b0246f..b20734cd44 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/test/java/org/apache/dubbo/rpc/protocol/rest/JaxrsRestProtocolTest.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/test/java/org/apache/dubbo/rpc/protocol/rest/JaxrsRestProtocolTest.java
@@ -63,6 +63,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.List;
import java.util.Map;
import static org.apache.dubbo.remoting.Constants.SERVER_KEY;
@@ -745,6 +746,35 @@ class JaxrsRestProtocolTest {
exporter.unexport();
}
+ @Test
+ void testBody() {
+
+
+ Assertions.assertThrowsExactly(RpcException.class, () -> {
+ DemoService server = new DemoServiceImpl();
+
+ URL url = this.registerProvider(exportUrl, server, DemoService.class);
+
+ URL nettyUrl = url.addParameter(org.apache.dubbo.remoting.Constants.PAYLOAD_KEY, 1024);
+
+ Exporter exporter = protocol.export(proxy.getInvoker(server, DemoService.class, nettyUrl));
+
+
+ DemoService demoService = this.proxy.getProxy(protocol.refer(DemoService.class, nettyUrl));
+
+ List users = new ArrayList<>();
+ for (int i = 0; i < 10000; i++) {
+ users.add(User.getInstance());
+
+ }
+
+ demoService.list(users);
+
+ exporter.unexport();
+ });
+
+ }
+
private URL registerProvider(URL url, Object impl, Class> interfaceClass) {
ServiceDescriptor serviceDescriptor = repository.registerService(interfaceClass);
ProviderModel providerModel = new ProviderModel(
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/test/java/org/apache/dubbo/rpc/protocol/rest/rest/TestGetInvokerServiceImpl.java b/dubbo-rpc/dubbo-rpc-rest/src/test/java/org/apache/dubbo/rpc/protocol/rest/rest/TestGetInvokerServiceImpl.java
index b61f4afdfa..ed66a1e3f8 100644
--- a/dubbo-rpc/dubbo-rpc-rest/src/test/java/org/apache/dubbo/rpc/protocol/rest/rest/TestGetInvokerServiceImpl.java
+++ b/dubbo-rpc/dubbo-rpc-rest/src/test/java/org/apache/dubbo/rpc/protocol/rest/rest/TestGetInvokerServiceImpl.java
@@ -31,6 +31,7 @@ public class TestGetInvokerServiceImpl implements TestGetInvokerService {
@Override
public String getInvoker() {
Object request = RpcContext.getServiceContext().getRequest();
+ RequestFacade requestFacade = (RequestFacade) request;
Invoker invokerByRequest = RestRPCInvocationUtil.getInvokerByRequest((RequestFacade) request);
@@ -44,9 +45,9 @@ public class TestGetInvokerServiceImpl implements TestGetInvokerService {
}
- Invoker invokerByServiceInvokeMethod = RestRPCInvocationUtil.getInvokerByServiceInvokeMethod(hello);
+ Invoker invokerByServiceInvokeMethod = RestRPCInvocationUtil.getInvokerByServiceInvokeMethod(hello,requestFacade.getServiceDeployer());
- Invoker invoker = RestRPCInvocationUtil.getInvokerByServiceInvokeMethod(hashcode);
+ Invoker invoker = RestRPCInvocationUtil.getInvokerByServiceInvokeMethod(hashcode,requestFacade.getServiceDeployer());
Assertions.assertEquals(invokerByRequest, invokerByServiceInvokeMethod);
diff --git a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java
index c5ba56b1db..61c6870c50 100644
--- a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java
+++ b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java
@@ -25,6 +25,7 @@ import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.stream.StreamObserver;
import org.apache.dubbo.common.threadpool.ThreadlessExecutor;
+import org.apache.dubbo.common.utils.ReflectUtils;
import org.apache.dubbo.remoting.api.connection.AbstractConnectionClient;
import org.apache.dubbo.rpc.AppResponse;
import org.apache.dubbo.rpc.AsyncRpcResult;
@@ -55,6 +56,7 @@ import org.apache.dubbo.rpc.protocol.tri.compressor.Compressor;
import org.apache.dubbo.rpc.protocol.tri.compressor.Identity;
import org.apache.dubbo.rpc.protocol.tri.observer.ClientCallToObserverAdapter;
import org.apache.dubbo.rpc.protocol.tri.transport.TripleWriteQueue;
+import org.apache.dubbo.rpc.service.ServiceDescriptorInternalCache;
import org.apache.dubbo.rpc.support.RpcUtils;
import io.netty.util.AsciiString;
@@ -65,6 +67,7 @@ import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.locks.ReentrantLock;
+import java.util.stream.Collectors;
import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.DUBBO_PACKABLE_METHOD_FACTORY;
@@ -131,9 +134,13 @@ public class TripleInvoker extends AbstractInvoker {
ConsumerModel consumerModel = (ConsumerModel) (invocation.getServiceModel() != null
? invocation.getServiceModel() : getUrl().getServiceModel());
ServiceDescriptor serviceDescriptor = consumerModel.getServiceModel();
- final MethodDescriptor methodDescriptor = serviceDescriptor.getMethod(
- invocation.getMethodName(),
- invocation.getParameterTypes());
+ final MethodDescriptor methodDescriptor;
+ boolean genericCall = RpcUtils.isGenericCall(ReflectUtils.getDesc(invocation.getParameterTypes()), invocation.getMethodName());
+ if (!genericCall) {
+ methodDescriptor = serviceDescriptor.getMethod(invocation.getMethodName(), invocation.getParameterTypes());
+ } else {
+ methodDescriptor = ServiceDescriptorInternalCache.genericService().getMethod(invocation.getMethodName(), invocation.getParameterTypes());
+ }
ExecutorService callbackExecutor = isSync(methodDescriptor, invocation) ? new ThreadlessExecutor() : streamExecutor;
ClientCall call = new TripleClientCall(connectionClient, callbackExecutor,
getUrl().getOrDefaultFrameworkModel(), writeQueue);
@@ -239,7 +246,15 @@ public class TripleInvoker extends AbstractInvoker {
if (methodDescriptor instanceof StubMethodDescriptor) {
pureArgument = invocation.getArguments()[0];
} else {
- pureArgument = invocation.getArguments();
+ if (methodDescriptor.isGeneric()) {
+ Object[] args = new Object[3];
+ args[0] = RpcUtils.getMethodName(invocation);
+ args[1] = Arrays.stream(RpcUtils.getParameterTypes(invocation)).map(Class::getName).collect(Collectors.toList());
+ args[2] = RpcUtils.getArguments(invocation);
+ pureArgument = args;
+ } else {
+ pureArgument = invocation.getArguments();
+ }
}
result = new AsyncRpcResult(future, invocation);
if (setFutureWhenSync || ((RpcInvocation) invocation).getInvokeMode() != InvokeMode.SYNC) {
diff --git a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/TripleClientCall.java b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/TripleClientCall.java
index 4ba712e843..3673bd5e83 100644
--- a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/TripleClientCall.java
+++ b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/TripleClientCall.java
@@ -188,7 +188,7 @@ public class TripleClientCall implements ClientCall, ClientStream.Listener {
} catch (Throwable t) {
LOGGER.error(PROTOCOL_FAILED_SERIALIZE_TRIPLE, "", "", String.format("Serialize triple request failed, service=%s method=%s",
requestMetadata.service,
- requestMetadata.method), t);
+ requestMetadata.method.getMethodName()), t);
cancelByLocal(t);
listener.onClose(TriRpcStatus.INTERNAL.withDescription("Serialize request failed")
.withCause(t), null, false);
diff --git a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/frame/TriDecoder.java b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/frame/TriDecoder.java
index e2fbbcfb16..5fcfda427d 100644
--- a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/frame/TriDecoder.java
+++ b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/frame/TriDecoder.java
@@ -17,12 +17,11 @@
package org.apache.dubbo.rpc.protocol.tri.frame;
-import org.apache.dubbo.rpc.RpcException;
-import org.apache.dubbo.rpc.protocol.tri.compressor.DeCompressor;
-
import io.netty.buffer.ByteBuf;
import io.netty.buffer.CompositeByteBuf;
import io.netty.buffer.Unpooled;
+import org.apache.dubbo.rpc.RpcException;
+import org.apache.dubbo.rpc.protocol.tri.compressor.DeCompressor;
public class TriDecoder implements Deframer {
@@ -152,6 +151,7 @@ public class TriDecoder implements Deframer {
private byte[] getUncompressedBody() {
byte[] data = new byte[requiredLength];
accumulate.readBytes(data);
+ accumulate.discardReadComponents();
return data;
}
diff --git a/dubbo-rpc/dubbo-rpc-triple/src/test/java/org/apache/dubbo/rpc/protocol/tri/stream/TripleClientStreamTest.java b/dubbo-rpc/dubbo-rpc-triple/src/test/java/org/apache/dubbo/rpc/protocol/tri/stream/TripleClientStreamTest.java
index a95718b3ca..0ab866e6cc 100644
--- a/dubbo-rpc/dubbo-rpc-triple/src/test/java/org/apache/dubbo/rpc/protocol/tri/stream/TripleClientStreamTest.java
+++ b/dubbo-rpc/dubbo-rpc-triple/src/test/java/org/apache/dubbo/rpc/protocol/tri/stream/TripleClientStreamTest.java
@@ -17,8 +17,15 @@
package org.apache.dubbo.rpc.protocol.tri.stream;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
+import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.channel.nio.NioEventLoopGroup;
+import io.netty.handler.codec.http.HttpResponseStatus;
+import io.netty.handler.codec.http.HttpScheme;
+import io.netty.handler.codec.http2.DefaultHttp2Headers;
import io.netty.handler.codec.http2.Http2StreamChannel;
+import io.netty.util.concurrent.ImmediateEventExecutor;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.rpc.TriRpcStatus;
import org.apache.dubbo.rpc.model.ApplicationModel;
@@ -38,21 +45,12 @@ import org.apache.dubbo.rpc.protocol.tri.compressor.Compressor;
import org.apache.dubbo.rpc.protocol.tri.support.IGreeter;
import org.apache.dubbo.rpc.protocol.tri.transport.H2TransportListener;
import org.apache.dubbo.rpc.protocol.tri.transport.TripleWriteQueue;
-
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import io.netty.channel.embedded.EmbeddedChannel;
-import io.netty.handler.codec.http.HttpResponseStatus;
-import io.netty.handler.codec.http.HttpScheme;
-import io.netty.handler.codec.http2.DefaultHttp2Headers;
-import io.netty.util.concurrent.ImmediateEventExecutor;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.util.concurrent.Executor;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -121,7 +119,6 @@ class TripleClientStreamTest {
byte[] data = new byte[]{0, 0, 0, 0, 1, 1};
final ByteBuf buf = Unpooled.wrappedBuffer(data);
transportListener.onData(buf, false);
- buf.release();
Assertions.assertEquals(1, listener.message.length);
}
}
diff --git a/dubbo-serialization/dubbo-serialization-fastjson2/src/main/java/org/apache/dubbo/common/serialize/fastjson2/Fastjson2SecurityManager.java b/dubbo-serialization/dubbo-serialization-fastjson2/src/main/java/org/apache/dubbo/common/serialize/fastjson2/Fastjson2SecurityManager.java
index 32e477b2e3..1c1258af55 100644
--- a/dubbo-serialization/dubbo-serialization-fastjson2/src/main/java/org/apache/dubbo/common/serialize/fastjson2/Fastjson2SecurityManager.java
+++ b/dubbo-serialization/dubbo-serialization-fastjson2/src/main/java/org/apache/dubbo/common/serialize/fastjson2/Fastjson2SecurityManager.java
@@ -16,10 +16,6 @@
*/
package org.apache.dubbo.common.serialize.fastjson2;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.utils.AllowClassNotifyListener;
@@ -31,6 +27,10 @@ import org.apache.dubbo.rpc.model.FrameworkModel;
import com.alibaba.fastjson2.filter.ContextAutoTypeBeforeHandler;
import com.alibaba.fastjson2.util.TypeUtils;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
import static com.alibaba.fastjson2.util.TypeUtils.loadClass;
import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_UNTRUSTED_SERIALIZE_CLASS;
import static org.apache.dubbo.common.utils.SerializeCheckStatus.STRICT;
@@ -115,14 +115,14 @@ public class Fastjson2SecurityManager implements AllowClassNotifyListener {
logger.error(PROTOCOL_UNTRUSTED_SERIALIZE_CLASS, "", "", msg);
}
- return null;
+ throw new IllegalArgumentException(msg);
}
// 3. try load
Class> localClass = loadClassDirectly(typeName);
if (localClass != null) {
if (status == SerializeCheckStatus.WARN && serializeSecurityManager.getWarnedClasses().add(typeName)) {
- logger.error(PROTOCOL_UNTRUSTED_SERIALIZE_CLASS, "", "",
+ logger.warn(PROTOCOL_UNTRUSTED_SERIALIZE_CLASS, "", "",
"[Serialization Security] Serialized class " + localClass.getName() + " is not in allow list. " +
"Current mode is `WARN`, will allow to deserialize it by default. " +
"Dubbo will set to `STRICT` mode by default in the future. " +
@@ -152,7 +152,7 @@ public class Fastjson2SecurityManager implements AllowClassNotifyListener {
"Current mode is `WARN`, will disallow to deserialize it by default. " +
"Please add it into security/serialize.allowlist or follow FAQ to configure it.";
if (serializeSecurityManager.getWarnedClasses().add(typeName)) {
- logger.error(PROTOCOL_UNTRUSTED_SERIALIZE_CLASS, "", "", msg);
+ logger.warn(PROTOCOL_UNTRUSTED_SERIALIZE_CLASS, "", "", msg);
}
}
diff --git a/dubbo-spring-boot/dubbo-spring-boot-actuator/README.md b/dubbo-spring-boot/dubbo-spring-boot-actuator/README.md
index 8b2f0805c7..b0f22c027c 100644
--- a/dubbo-spring-boot/dubbo-spring-boot-actuator/README.md
+++ b/dubbo-spring-boot/dubbo-spring-boot-actuator/README.md
@@ -473,7 +473,7 @@ management.health.dubbo.status.extras = load,threadpool
`management.health.dubbo.enabled` is a enabled configuration to turn on or off health checks feature, its' default is `true`.
- If you'd like to disable health checks , you chould apply `management.health.dubbo.enabled` to be `false`:
+ If you'd like to disable health checks , you could apply `management.health.dubbo.enabled` to be `false`:
```properties
management.health.dubbo.enabled = false
diff --git a/dubbo-spring-boot/dubbo-spring-boot-autoconfigure/README.md b/dubbo-spring-boot/dubbo-spring-boot-autoconfigure/README.md
index 0e0dd0f0f0..c43f119627 100644
--- a/dubbo-spring-boot/dubbo-spring-boot-autoconfigure/README.md
+++ b/dubbo-spring-boot/dubbo-spring-boot-autoconfigure/README.md
@@ -48,7 +48,7 @@ If your project failed to resolve the dependency, try to add the following repos
## Auto Configuration
-Since `2.5.7` , Dubbo totally supports Annotation-Driven , core Dubbo's components that are registered and initialized in Spring application context , including exterialized configuration features. However , those features need to trigger in manual configuration , e.g `@DubboComponentScan` , `@EnableDubboConfig` or `@EnableDubbo`.
+Since `2.5.7` , Dubbo totally supports Annotation-Driven , core Dubbo's components that are registered and initialized in Spring application context , including externalized configuration features. However , those features need to trigger in manual configuration , e.g `@DubboComponentScan` , `@EnableDubboConfig` or `@EnableDubbo`.
> If you'd like to learn more , please read [Dubbo Annotation-Driven (Chinese)](http://dubbo.apache.org/zh-cn/blog/dubbo-annotation-driven.html)
@@ -76,7 +76,7 @@ dubbo.application.owner = bar
dubbo.registry.address = 10.20.153.10:9090
```
-There are two Spring Beans will be initialized when Spring `ApplicatonContext` is ready, their Bean types are `ApplicationConfig` and `RegistryConfig`.
+There are two Spring Beans will be initialized when Spring `ApplicationContext` is ready, their Bean types are `ApplicationConfig` and `RegistryConfig`.
@@ -181,7 +181,7 @@ The whole Properties Mapping of "Multiple Dubbo Config Bean Bindings" lists belo
There is a different way to identify Multiple Dubbo Config Bean , the configuration pattern is like this :
-`${config-property-prefix}.${config-bean-id}.${property-name} = some value` , let's explain those placehoders :
+`${config-property-prefix}.${config-bean-id}.${property-name} = some value` , let's explain those placeholders :
- `${config-property-prefix}` : The The prefix of property name for Multiple Bindings , e.g. `dubbo.protocols`, `dubbo.applications` and so on.
- `${config-bean-id}` : The bean id of Dubbo's `*Config`
@@ -217,7 +217,7 @@ If you used advanced IDE tools , for instance [Jetbrains IDEA Ultimate](https://
-#### Case 2 - Mutiple Bindings
+#### Case 2 - Multiple Bindings

diff --git a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java
index 44a0ae59de..adeb94b1f6 100644
--- a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java
+++ b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java
@@ -33,7 +33,6 @@ import java.util.Map;
import java.util.Properties;
import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_APPLICATION_NAME_PROPERTY;
-import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_APPLICATION_QOS_ENABLE_PROPERTY;
import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_CONFIG_MULTIPLE_PROPERTY;
import static org.apache.dubbo.spring.boot.util.DubboUtils.SPRING_APPLICATION_NAME_PROPERTY;
@@ -73,8 +72,6 @@ public class DubboDefaultPropertiesEnvironmentPostProcessor implements Environme
Map defaultProperties = new HashMap<>();
setDubboApplicationNameProperty(environment, defaultProperties);
setDubboConfigMultipleProperty(defaultProperties);
- setDubboApplicationQosEnableProperty(defaultProperties);
- //setAllowBeanDefinitionOverriding(defaultProperties);
return defaultProperties;
}
@@ -90,9 +87,7 @@ public class DubboDefaultPropertiesEnvironmentPostProcessor implements Environme
defaultProperties.put(DUBBO_CONFIG_MULTIPLE_PROPERTY, Boolean.TRUE.toString());
}
- private void setDubboApplicationQosEnableProperty(Map defaultProperties) {
- defaultProperties.put(DUBBO_APPLICATION_QOS_ENABLE_PROPERTY, Boolean.TRUE.toString());
- }
+
/**
* Set {@link #ALLOW_BEAN_DEFINITION_OVERRIDING_PROPERTY "spring.main.allow-bean-definition-overriding"} to be
diff --git a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
index bde4c383a7..56642875d2 100644
--- a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
+++ b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
@@ -53,7 +53,7 @@ public class DubboDefaultPropertiesEnvironmentPostProcessorTest {
PropertySource defaultPropertySource = propertySources.get("defaultProperties");
Assert.assertNotNull(defaultPropertySource);
Assert.assertEquals("true", defaultPropertySource.getProperty("dubbo.config.multiple"));
- Assert.assertEquals("true", defaultPropertySource.getProperty("dubbo.application.qos-enable"));
+ // Assert.assertEquals("true", defaultPropertySource.getProperty("dubbo.application.qos-enable"));
// Case 2 : Only set property "spring.application.name"
environment.setProperty("spring.application.name", "demo-dubbo-application");
diff --git a/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml
index dbd3c6c903..1ed28d1b5a 100644
--- a/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml
+++ b/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml
@@ -38,9 +38,9 @@
- 1.11.2
- 1.1.3
- 1.28.0
+ 1.11.3
+ 1.1.4
+ 1.29.0
2.16.4
0.16.0
diff --git a/dubbo-test/dubbo-dependencies-all/pom.xml b/dubbo-test/dubbo-dependencies-all/pom.xml
index 9f407a4dbb..0216003790 100644
--- a/dubbo-test/dubbo-dependencies-all/pom.xml
+++ b/dubbo-test/dubbo-dependencies-all/pom.xml
@@ -203,6 +203,13 @@
dubbo-metrics-config-center
${project.version}