I am trying to encrypt a column in my prostrgres DB. The column name is "test" of type "bytea".
My enity code is below,
@ColumnTransformer(read = "pgp_sym_decrypt(" + " test, "
+ " current_setting('encrypt.key')"
+ ")", write = "pgp_sym_encrypt( " + " ?, "
+ " current_setting('encrypt.key')" + ") ")
@Column(columnDefinition = "bytea")
private String test;
postgresql.conf configuration file: encrypt.key = 'Wow! So much security.
Placed the postgresql.conf configuration file in src/main/resources of spring boot appln. But the encryption.key value is not being picked up. And is there a way to pass the key using application.properties?