private void registerShenyuClient(final BeanDefinitionRegistry registry, final AnnotationMetadata annotationMetadata, final Map<String, Object> attributes) {
        String className = annotationMetadata.getClassName();
        ConfigurableBeanFactory beanFactory = registry instanceof ConfigurableBeanFactory ? (ConfigurableBeanFactory) registry : null;

        String name = getName(attributes);
        String contextId = getContextId(beanFactory, attributes);

        Class clazz = ClassUtils.resolveClassName(className, null);
        FeignClientFactoryBean factoryBean = new FeignClientFactoryBean();
        factoryBean.setBeanFactory(beanFactory);
        factoryBean.setName(name);
        factoryBean.setContextId(contextId);
        factoryBean.setType(clazz);
        factoryBean.setRefreshableClient(isClientRefreshEnabled());
        BeanDefinitionBuilder definition = BeanDefinitionBuilder.genericBeanDefinition(clazz, () -> {
            factoryBean.setUrl(name);
            factoryBean.setPath(getPath(beanFactory, attributes));
            factoryBean.setDismiss404(Boolean.parseBoolean(String.valueOf(attributes.get("dismiss404"))));
            Object fallback = attributes.get("fallback");
            if (Objects.nonNull(fallback)) {
                factoryBean.setFallback(fallback instanceof Class ? (Class<?>) fallback
                                            : ClassUtils.resolveClassName(fallback.toString(), null));
            }
            Object fallbackFactory = attributes.get("fallbackFactory");
            if (Objects.nonNull(fallbackFactory)) {
                factoryBean.setFallbackFactory(fallbackFactory instanceof Class ? (Class<?>) fallbackFactory
                                                   : ClassUtils.resolveClassName(fallbackFactory.toString(), null));
            }
            factoryBean.addCustomizer(builder -> {
                BeanFactory factory = beanFactory;
                if (Objects.isNull(beanFactory)) {
                    factory = factoryBean.getApplicationContext();
                }
                ShenyuClientCapability.INSTANCE.setBeanFactory(factory);
                builder.addCapability(ShenyuClientCapability.INSTANCE);
            });
            return factoryBean.getObject();
        });
        definition.setAutowireMode(AbstractBeanDefinition.AUTOWIRE_BY_TYPE);
        definition.setLazyInit(true);
        validate(attributes);

        AbstractBeanDefinition beanDefinition = definition.getBeanDefinition();
        beanDefinition.setAttribute(FactoryBean.OBJECT_TYPE_ATTRIBUTE, className);
        beanDefinition.setAttribute("shenyuClientsRegistrarFactoryBean", factoryBean);

        // has a default, won't be null
        boolean primary = (Boolean) attributes.get("primary");

        beanDefinition.setPrimary(primary);

        String[] qualifiers = getQualifiers(attributes);
        if (ObjectUtils.isEmpty(qualifiers)) {
            qualifiers = new String[] {name + "ShenyuClient"};
        }
        BeanDefinitionHolder holder = new BeanDefinitionHolder(beanDefinition, className, qualifiers);
        BeanDefinitionReaderUtils.registerBeanDefinition(holder, registry);

    }
Register shenyu clients.
@param metadata the metadata
@param registry the registry
shenyu-sdk/shenyu-sdk-feign/src/main/java/org/apache/shenyu/sdk/feign/ShenyuClientsRegistrar.java