title: Jaxb: Passing parameter to @XmlJavaTypeAdapter
body: <p>I am creating soap webservice using: Spring Boot / JAX-WS (CXF)
  I want to encrypt one field. I am using XmlJavaTypeAdapter for this.
  For example: </p>
  
  <pre><code>   @XmlJavaTypeAdapter(CypherStringAdapter.class)
     private String cryptedField;
  </code></pre>
  
  <p>The CypherStringAdapter class:</p>
  
  <pre><code>package fr.hop.meta4;
  
  import java.io.UnsupportedEncodingException;    
  import javax.xml.bind.annotation.adapters.XmlAdapter;    
  import org.springframework.beans.factory.annotation.Value;    
  import fr.hop.aes.AESEncryptor;
  
  public class CypherStringAdapter extends XmlAdapter&lt;String, String&gt; {
  
      @Value("${cypher.key}") 
      private String key;
  
      private AESEncryptor cypher;
  
      public CypherStringAdapter() throws UnsupportedEncodingException {    
          cypher = new AESEncryptor(key);        
      }
  
      @Override
      public String marshal(String v) throws Exception {
  
          if (v != null)
              return cypher.encrypt(v);
  
          return null; 
      }
  
      @Override
      public String unmarshal(String v) throws Exception {
          if (v != null)
                return cypher.decrypt(v);
  
          return null;        
      }
  }
  </code></pre>
  
  <p>I want to externalize the key value. I am try with @value annotation but it's not working (always null value). How i could achieve to send key to XmlJavaTypeAdapter ?</p>
  
  <p>Regards</p>