@Override
    @Transactional(rollbackFor = Exception.class)
    public String bindingDiscoveryHandler(final ProxySelectorAddDTO proxySelectorAddDTO) {
        Timestamp currentTime = new Timestamp(System.currentTimeMillis());
        String selectorId = proxySelectorAddDTO.getSelectorId();
        DiscoveryProcessor discoveryProcessor = discoveryProcessorHolder.chooseProcessor(proxySelectorAddDTO.getDiscovery().getDiscoveryType());
        ProxySelectorAddDTO.Discovery discovery = proxySelectorAddDTO.getDiscovery();
        String discoveryId = discovery.getId();
        if (!StringUtils.hasLength(discoveryId)) {
            discoveryId = UUIDUtils.getInstance().generateShortUuid();
            DiscoveryDO discoveryDO = buildDiscovery(proxySelectorAddDTO, currentTime, discoveryId);
            discoveryMapper.insertSelective(discoveryDO);
            discoveryProcessor.createDiscovery(discoveryDO);
        }
        String discoveryHandlerId = UUIDUtils.getInstance().generateShortUuid();
        DiscoveryHandlerDO discoveryHandlerDO = DiscoveryHandlerDO.builder()
                .id(discoveryHandlerId)
                .discoveryId(discoveryId)
                .dateCreated(currentTime)
                .dateUpdated(currentTime)
                .listenerNode(proxySelectorAddDTO.getListenerNode())
                .handler(Objects.isNull(proxySelectorAddDTO.getHandler()) ? "" : proxySelectorAddDTO.getHandler())
                .props(proxySelectorAddDTO.getProps())
                .build();
        discoveryHandlerMapper.insertSelective(discoveryHandlerDO);
        DiscoveryRelDO discoveryRelDO = DiscoveryRelDO.builder()
                .id(UUIDUtils.getInstance().generateShortUuid())
                .pluginName(proxySelectorAddDTO.getPluginName())
                .discoveryHandlerId(discoveryHandlerId)
                .selectorId(selectorId)
                .dateCreated(currentTime)
                .dateUpdated(currentTime)
                .build();
        discoveryRelMapper.insertSelective(discoveryRelDO);
        ProxySelectorDTO proxySelectorDTO = new ProxySelectorDTO();
        proxySelectorDTO.setPluginName(proxySelectorAddDTO.getPluginName());
        proxySelectorDTO.setName(proxySelectorAddDTO.getName());
        proxySelectorDTO.setId(selectorId);
        proxySelectorDTO.setNamespaceId(proxySelectorAddDTO.getNamespaceId());
        DiscoveryHandlerDTO discoveryHandlerDTO = DiscoveryTransfer.INSTANCE.mapToDTO(discoveryHandlerDO);
        discoveryProcessor.createProxySelector(discoveryHandlerDTO, proxySelectorDTO);
        addUpstreamList(proxySelectorAddDTO, currentTime, discoveryProcessor, discoveryHandlerId, proxySelectorDTO);
        return ShenyuResultMessage.CREATE_SUCCESS;
    }
add proxy selector.

@param proxySelectorAddDTO {@link ProxySelectorAddDTO}
@return insert data count
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ProxySelectorServiceImpl.java