`@Entity(value = "entity", useDiscriminator = false)
@EntityListeners(FieldSigner.class)
public class Entity Aextends RootDocument {
private String name;
@EncryptedField
private String businessEmail;
}
@target({ElementType.FIELD, ElementType.TYPE})
@retention(RetentionPolicy.RUNTIME)
public @interface EncryptedField {
}
@singleton
@startup
public class FieldSigner {
@PrePersist
void prePersist(Object entity) throws IllegalAccessException {}
@PostLoad
void onPostLoad( Object entity ) throws IllegalAccessException {
}
`
The signer class may be triggered when the entity register in morphia lifeCycle decoder. Are there any properties ensure the entity class being mapped in the lifeCycleDeoced?
`@Entity(value = "entity", useDiscriminator = false)
@EntityListeners(FieldSigner.class)
public class Entity Aextends RootDocument {
private String name;
@EncryptedField
private String businessEmail;
}
@target({ElementType.FIELD, ElementType.TYPE})
@retention(RetentionPolicy.RUNTIME)
public @interface EncryptedField {
}
@singleton
@startup
public class FieldSigner {
@PrePersist
void prePersist(Object entity) throws IllegalAccessException {}
@PostLoad
void onPostLoad( Object entity ) throws IllegalAccessException {
}
`
The signer class may be triggered when the entity register in morphia lifeCycle decoder. Are there any properties ensure the entity class being mapped in the lifeCycleDeoced?