@Override
    protected void processMethod(ResourceFactory rf, String base, ResourceLocator method)
    {
        ResteasyUriBuilder builder = new ResteasyUriBuilder();
        if (base != null) {
            builder.path(base);
        }
        builder.path(method.getFullpath());
        String fullpath = builder.getPath();
        if (fullpath == null) {
            fullpath = "";
        }

        builder = new ResteasyUriBuilder();
        if (base != null) {
            builder.path(base);
        }
        builder.path(method.getResourceClass().getPath());
        String classExpression = builder.getPath();
        if (classExpression == null) {
            classExpression = "";
        }

        InjectorFactory injectorFactory = providerFactory.getInjectorFactory();
        if (method instanceof ResourceMethod)
        {
            ResourceMethodInvoker invoker = new SofaResourceMethodInvoker((ResourceMethod) method, injectorFactory, rf,
                providerFactory); // CHANGE
            if (widerMatching) {
                rootNode.addInvoker(fullpath, invoker);
            } else {
                root.addInvoker(classExpression, fullpath, invoker);
            }
        }
        else
        {
            ResourceLocatorInvoker locator = new ResourceLocatorInvoker(rf, injectorFactory, providerFactory, method);
            if (widerMatching) {
                rootNode.addInvoker(fullpath, locator);
            } else {
                root.addInvoker(classExpression, fullpath, locator);
            }
        }
    }
Add a custom resource implementation endpoint.

@param ref
@param basePath prefix path of resource
remoting/remoting-resteasy/src/main/java/com/alipay/sofa/rpc/server/rest/SofaResourceMethodRegistry.java