Skip to content

sunitk/generic-jpa-converter-encrypt-decrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot 2 generic JPA converter to encrypt and decrypt an entity attribute

Generic JPA converter for encryption decryption. Uses Spring Boot, JPA with Hibernate.

JPA allows writing 'conversion' code so that an entity attribute (table column) can be converted from one type to another and back. Though this is not a latest feature of JPA nor a bleeding edge topic, I am sharing how I wrote a generic converter for encryption and decryption of a string type table column.

This repository contains code which accompanies the blog post Spring Boot 2 generic JPA converter to encrypt and decrypt an entity attribute

Getting Started

This is a typical maven project. Download the source as a zip file or checkout the code and import as an Existing Maven project in your IDE.

Prerequisites

  • Java 8
  • Spring Boot 2
  • MySQL
  • Not mandatory, but you can use any suitable IDE like Spring STS

Built With

Authors

License

This project is licensed under the Apache License - see the LICENSE.md file for details

Request

You are free to fork this repository, but please drop me a note at [email protected]