Description
While this is rather difficult to achieve in practice, it may be worth exploring the possibilities.
One of the challenges in properly detecting the use of certain annotations (e.g. @Indexed
) on application domain objects without the associated "enabling" annotation (e.g. @EnableIndexing
) is that, by way of example, the application domain model objects containing @Indexed
annotations are not even picked up unless the @EnableIndexing
annotation is present since that triggers a "scan", which is necessary to 1) limit the scope of the application object types introspected as well as 2) detect whether any @Indexed
annotations have been declared. Without the scan, the objects containing the annotations are not even inspected in the first place, so how would the infrastructure know the @Indexed
annotation was used without @EnableIndexing
, for instance. The "enabling" annotation is needed to begin the scan for the object-level annotations, like @Indexed
.