title: How to add XML declaration in the xml returning from the end-point
body: <p>I have added the following into my Application</p>
  
  <pre><code>@Bean
  public MappingJackson2XmlHttpMessageConverter mappingJackson2XmlHttpMessageConverter() {
      MappingJackson2XmlHttpMessageConverter xmlConverter = new MappingJackson2XmlHttpMessageConverter();
      XmlMapper objectMapper = new XmlMapper();
      objectMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);
      xmlConverter.setObjectMapper(objectMapper);
      return xmlConverter;
  }
  </code></pre>
  
  <p>However, the xml returned as follows i.e. the xml declaration is missing. any ideas what else I need to add?</p>
  
  <pre><code>&lt;Data&gt;
  &lt;description&gt;&lt;/description&gt;
  &lt;codeList&gt;
      &lt;codeList&gt;
          &lt;description&gt;User ID&lt;/description&gt;
          &lt;key&gt;dfdfeee&lt;/key&gt;
      &lt;/codeList&gt;
      &lt;codeList&gt;
          &lt;description&gt;Activation ID&lt;/description&gt;
          &lt;key&gt;2ddddd9881&lt;/key&gt;
      &lt;/codeList&gt;
  &lt;/codeList&gt;
  </code></pre>
  
  <p></p>