Quickstart
Encrypt PII in Spring Boot
Call the encryption API from Spring Boot. One JSON blob per logical secret.
RestClient
RestClient http = RestClient.create("https://en-decrypt.com");
String value = http.post().uri("/v1/encrypt")
.header("Authorization", "Bearer " + key)
.contentType(MediaType.APPLICATION_JSON)
.body(Map.of("1", json))
.retrieve().body(Map.class).get("1");
Persist the returned value on the entity. Do not encrypt each column separately.