You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[OPTIONAL] Add support to log warnings about the use of certain Annotations (e.g. @Indexed) in the absence of the enabling Annotation (e.g. @EnableIndexing).
#7
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.
The text was updated successfully, but these errors were encountered:
jxblum
changed the title
Add support to log warnings about the use of certain annotations (e.g. @Indexed) in the absence of the enabling Annotation (e.g. @EnableIndexing).
Add support to log warnings about the use of certain Annotations (e.g. @Indexed) in the absence of the enabling Annotation (e.g. @EnableIndexing).
Aug 21, 2019
Of course, if users want to incur the penalty, infrastructure components could be added in SBDG to necessarily scan all the application class types. This might be useful at development time in order to ensure proper behavior of the application at runtime, in production, such as, "we indexed one or more application domain model object(s) properties with @Indexed and we want to make sure our Spring configuration enabled indexing with the @EnableIndexing annotation."
Additional configuration properties used by the supporting infrastructure components could be defined so that the scan could be further limited.
Still, the use of such a feature should be carefully considered since there would be both a 1) resource (memory) penalty in addition to 2) a startup time penalty.
At any rate, further and careful consideration for such a feature in SBDG is needed.
jxblum
changed the title
Add support to log warnings about the use of certain Annotations (e.g. @Indexed) in the absence of the enabling Annotation (e.g. @EnableIndexing).
[OPTIONAL] Add support to log warnings about the use of certain Annotations (e.g. @Indexed) in the absence of the enabling Annotation (e.g. @EnableIndexing).
Aug 5, 2023
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
.The text was updated successfully, but these errors were encountered: