@Override
    public void postProcessBeanFactory(@NotNull final ConfigurableListableBeanFactory beanFactory)
            throws BeansException {

        final GrpcClientConstructorInjection grpcClientConstructorInjection = new GrpcClientConstructorInjection();

        // Use bean name to get bean class to avoid triggering bean init
        beanFactory.getBeanNamesIterator().forEachRemaining(beanName -> {
            final Class<?> clazz = beanFactory.getType(beanName);
            if (clazz == null) {
                return;
            }

            BeanDefinition beanDefinition = null;
            try {
                beanDefinition = beanFactory.getBeanDefinition(beanName);
            } catch (final NoSuchBeanDefinitionException ignored) {
                return;
            }

            // Search for GrpcClient annotation in all parameters of all constructors
            for (final Executable constructor : getConstructorCandidates(beanFactory, beanDefinition, clazz)) {
                final Parameter[] parameters = constructor.getParameters();
                for (int i = 0; i < parameters.length; i++) {
                    final Parameter parameter = parameters[i];
                    final GrpcClient client = parameter.getAnnotation(GrpcClient.class);
                    if (client == null) {
                        continue;
                    }

                    final GrpcClientConstructorInjection.Registry registry =
                            new GrpcClientConstructorInjection.Registry(
                                    parameter.getType(),
                                    client,
                                    clazz,
                                    beanDefinition,
                                    i);

                    grpcClientConstructorInjection.add(registry);
                }
            }
        });

        if (!grpcClientConstructorInjection.isEmpty()) {
            beanFactory.registerSingleton(BEAN_NAME, grpcClientConstructorInjection);
        }
    }
{@link BeanFactoryPostProcessor} that searches the bean definitions for {@link GrpcClient} annotations on
constructors and factory methods.
grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/inject/GrpcClientConstructorInjectionBeanFactoryPostProcessor.java