![image](https://user-images.githubusercontent.com/18097545/78014651-d54cb580-737a-11ea-809c-fe5dc884ec55.png)

dubbo 2.7.3， 同时暴露rest和dubbo，com.alibaba.dubbo.samples.echo.api.EchoService这个接口是dubbo协议的，还是当做rest来暴露？

Lock readLock = lock.readLock();
        V value = null;
        try {
            readLock.lock();
            value = callable.call();
        } catch (Throwable e) {
            throw new RuntimeException(e);
        } finally {
            readLock.unlock();
        }
        return value;
    }
    private static void checkDuplicate(AbstractConfig oldOne, AbstractConfig newOne) throws IllegalStateException {
        if (oldOne != null && !oldOne.equals(newOne)) {
            String configName = oldOne.getClass().getSimpleName();
            logger.warn("Duplicate Config found for " + configName + ", you should use only one unique " + configName + " for one application.");
        }
    }
    private static Map newMap() {
        return new HashMap<>();
    }
    static <C extends AbstractConfig> void addIfAbsent(C config, Map<String, C> configsMap, boolean unique)
            throws IllegalStateException {
        if (config == null || configsMap == null) {
            return;
        }
        if (unique) { 
            configsMap.values().forEach(c -> {
                checkDuplicate(c, config);
            });