@PostConstruct
    private void init() {
        Reflections methodReflections = new Reflections(METHOD_FILTER_PATH, Scanners.MethodsAnnotated);
        // process methods
        Set<Method> methodSet = methodReflections.getMethodsAnnotatedWith(MultiTenantQuery.class);
        markMethods(methodSet);

        // process classes
        Reflections reflections = new Reflections(METHOD_FILTER_PATH, Scanners.TypesAnnotated);
        Set<Class<?>> clazzSet = reflections.getTypesAnnotatedWith(MultiTenantQuery.class);
        clazzSet.stream()
                .filter(Class::isInterface)
                .forEach(clazz -> {
                    // Get the JsonTypeDefine annotation
                    MultiTenantQuery annotation = clazz.getAnnotation(MultiTenantQuery.class);
                    if (annotation == null || !annotation.with()) {
                        return;
                    }
                    List<Method> methods = Arrays.asList(clazz.getMethods());
                    markMethods(methods);
                });

        log.debug("success to find all methods that support multi-tenant queries, methods={}", METHOD_SET);
    }
Find all methods that support multi-tenant queries - used MultiTenantQuery annotation.
inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/interceptor/MultiTenantQueryFilter.java