使用@ComponentScan元注释的Spring自定义@Enable注释

I'm trying to write my own @Enable annotation for Spring framework, which should be used as follows:

package com.example.package.app;

@SpringBootApplication
@com.example.annotations.EnableCustom("com.example.package.custom")
public class MyApplication {}

I followed Component scan using custom annotation, but this poses several limitations:

  1. I cannot make the base package property dynamic, i.e. I cannot pass "com.example.package.base", but need to pre-define the package at the configuration.

    I had a look at @AliasFor, but cannot get it to work.

  2. When I leave out the base package, scanning starts from the defining package of the annotation, not from the package of the annotated class. In above's example, it would only scan and create beans for classes in com.example.annotations, but not for com.example.package.*.

    I had a look at EntityScanPackages.Registrar.class which is imported in @EntityScan annotation, but it is an internal class and my annotation cannot import.

Everything works if I put @ComponentScan(includeFilters = @ComponentScan.Filter(type = FilterType.ANNOTATION, value = MyAnnotation.class)) on MyApplication class, but stops working when this is moved to a meta-annotation of @EnableCustom. How to tell Spring Framework to consider @EnableCustom as a different way of specifying @ComponentScan with some default values. I tried meta-annotating my annotation with @Configuration, @Component and others, to no avail:

@Configuration
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@ComponentScan(
        includeFilters = @ComponentScan.Filter(
                type = FilterType.ANNOTATION,
                value = ApplicationService.class))
public @interface EnableApplicationServices {
    @AliasFor(annotation = ComponentScan.class, attribute = "basePackages")
    String[] value() default {};
}

在哪里可以找到有关此文档的文档,或者您会推荐什么起点?