I am trying to implement a JPA AttributeConverter for a column that converts a pojo to byte[]. It first encrypts the field in the pojo using a custom encryption util (that uses reflection) and then serialize it a to byte[] using Jackson objectMapper.
The source code for a demo app can be found here: https://bitbucket.org/bhaskar_/encryption-attribute-converter-demo/src/master/
This demo app has 3 test cases :
- To test the custom encryption util
- To test Jpa AttributeConverter using findById which passes
- To test Jpa AttributeConverter using findByRefId which fails
Any help in pin pointing the issue would be very helpful
Aucun commentaire:
Enregistrer un commentaire