public void registerHandlerMethods(String pluginId, Object handler) {
        Class<?> handlerType = (handler instanceof String beanName
            ? obtainApplicationContext().getType(beanName) : handler.getClass());

        if (handlerType != null) {
            final Class<?> userType = ClassUtils.getUserClass(handlerType);
            Map<Method, RequestMappingInfo> methods = MethodIntrospector.selectMethods(userType,
                (MethodIntrospector.MetadataLookup<RequestMappingInfo>)
                    method -> getPluginMappingForMethod(pluginId, method, userType));
            if (logger.isTraceEnabled()) {
                logger.trace(formatMappings(userType, methods));
            } else if (mappingsLogger.isDebugEnabled()) {
                mappingsLogger.debug(formatMappings(userType, methods));
            }
            methods.forEach((method, mapping) -> {
                Method invocableMethod = AopUtils.selectInvocableMethod(method, userType);
                registerHandlerMethod(handler, invocableMethod, mapping);
                pluginMappingInfo.add(pluginId, mapping);
            });
        }
    }
@Test
    public void getHandlerDirectMatch() {
        // register handler methods first
        handlerMapping.registerHandlerMethods("fakePlugin", new TestController());

        // resolve an expected method from TestController
        Method expected =
            ResolvableMethod.on(TestController.class).annot(getMapping("/foo")).build();

        // get handler by mock exchange
        ServerWebExchange exchange =
            MockServerWebExchange.from(
                get("/apis/api.plugin.halo.run/v1alpha1/plugins/fakePlugin/foo"));
        HandlerMethod hm = (HandlerMethod) this.handlerMapping.getHandler(exchange).block();

        assertThat(hm).isNotNull();
        assertThat(hm.getMethod()).isEqualTo(expected);
    }