title: injecting ConversionService into a custom Converter
body: <p>Using Spring mvc-3. I am writing a custom Converter which needs access to other Converters registered to a ConversionService. </p>
  
  <p>How can I accomplish this? I tried writing my custom converter as:</p>
  
  <pre><code>  class CustomConverter&lt;X, Y&gt;{
       @Autowired ConversionService service;
       //+getter &amp; setters of service
  
       public Y convert(X input){
            // I need access to service to lookup simple conversions such as
            // String array to Long array etc..
  
       }
  
    }
  </code></pre>
  
  <p>And I registered my custom converter via applicationContext.xml</p>
  
  <pre><code>  &lt;bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean"&gt;
       &lt;property name = "converters"&gt;
           &lt;list&gt;
              &lt;bean class="CustomConverter"/&gt;
           &lt;/list&gt;
       &lt;/property&gt;
    &lt;/bean&gt;
  </code></pre>
  
  <p>However, spring refuses to inject service into my CustomConverter(its always null). How can I accomplish this?</p>
  
  <p>Thank you!</p>