There is a new way of registering beans in a functional way coming in Spring Framework 7.0, first to appear in M3: https://github.com/spring-projects/spring-framework/issues/18353#issuecomment-2679682933 We should add support for taking those bean definitions into account when indexing beans.