Provides support to increase developer productivity in Java when using MongoDB. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
However the value bound to #target isn't particularly useful, it's just the simple class name (minus the package!) of the annotated class. See this line:
This limits the usefulness of the SPEL expression, especially in scenarios where users might want to use different encryption keys for different collections.
A simple but impactful enhancement would be to bind collection as a variable:
The
keyId
SPEL expression for the@Encrypted
annotation is great for avoiding hard-coding of encryption key ids. See docs here. Example:However the value bound to
#target
isn't particularly useful, it's just the simple class name (minus the package!) of the annotated class. See this line:This limits the usefulness of the SPEL expression, especially in scenarios where users might want to use different encryption keys for different collections.
A simple but impactful enhancement would be to bind
collection
as a variable:Curious to hear people's thoughts on this.