lundi 18 octobre 2021

Jpa AttributeConverter wrong value in field

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 :

  1. To test the custom encryption util
  2. To test Jpa AttributeConverter using findById which passes
  3. To test Jpa AttributeConverter using findByRefId which fails

Any help in pin pointing the issue would be very helpful





Aucun commentaire:

Enregistrer un commentaire