title: Spring hexadecimal String in properties file
body: <p>I have a hexidecimal value in a properties file and I want Spring to convert it to a byte array by using the @Value annotation in my java object.</p>
  
  <p>Example:</p>
  
  <pre><code>hex.value=CB53CD20B2F222D9
  </code></pre>
  
  <p>And in java i have the following:</p>
  
  <pre><code>@Value("#{myProperties['hex.value'] ?: ''}")
  private byte[] hexValue;
  </code></pre>
  
  <p>Spring currently just sets the String.getBytes() as hexValue but i want it to convert is to an actual byte array that represents the String. For example by using <a href="http://commons.apache.org/proper/commons-codec//javadocs/api-release/org/apache/commons/codec/binary/Hex.html#decode%28java.lang.Object%29" rel="nofollow" title="Commons-Codec Hex">Commons-Codec Hex</a></p>
  
  <p>Does anyone know how to configure Spring so that it doesn't just return the getBytes()?</p>