Skip to content

建议拿掉 ServletHttpBinder 类中 bind 方法上的 @Adaptive 注解 #5323

@xiaoheng1

Description

@xiaoheng1

我使用的是 dubbo 2.7.5

ServletHttpBind 类如下:

public class ServletHttpBinder implements HttpBinder {

    @Override
    @Adaptive()
    public HttpServer bind(URL url, HttpHandler handler) {
        return new ServletHttpServer(url, handler);
    }

}

我分析了下 JettyHttpBinder 和 TomcatHttpBinder,发现 ServletHttpBinder 是利用的本次 Servlet 请求,换句话说,假设一个服务部署在服务器上,那么发起一个请求,那么在一个 servlet 容器中进行
处理。此处的 Adaptive 注解对功能的实现没有影响,所以,建议拿掉该方法上的这个注解。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions