问题 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: 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