How can @ColumnTransformer use the value inside application.yaml

How can i put the encription_key and encription_type in the @ColumnTransformer Annotation ‘read’ or ‘write’ parameter from application.yaml

@ColumnTransformer(read = "convert_from(decrypt(decode(phone,'hex'), {encription key}, {encription method}),'utf8')", write = "encode(encrypt(convert_to(?,'utf8'),{encription key}, {encription method}),'hex')")

What i did is

  1. get the value from application.yaml and put it in
    @Value("${codec.iv}")
    private final static String key="";
  1. Use Database Custom function to return bytea::encription_key - it is works but not want to
  2. HardCoding
  3. I also see that using postgres.conf - not want.

What i want to do is
get the key and encription_method from external files(like application.yaml etc…)