title: Restful Response Showing \n Instead of New Line
body: <p>I am trying to generate a TEXT/PLAIN response for my Spring application. </p>
  
  <p>When I am debugging the code, I see the string nicely formatted:</p>
  
  <pre><code>LINE1
  LINE2
  ...
  </code></pre>
  
  <p>But when I see the response in Postman I see that the output is all messed up like </p>
  
  <pre><code>LINE1\nLIINE2\n....
  </code></pre>
  
  <p>I am not sure if the set up the controller properly or not! </p>
  
  <p>Here is my Controller class:</p>
  
  <pre><code>import java.io.StringReader;
  import java.util.concurrent.atomic.AtomicLong;
  import java.util.logging.Logger;
  
  import javax.ws.rs.Consumes;
  import javax.ws.rs.Produces;
  import javax.xml.bind.JAXBContext;
  import javax.xml.bind.JAXBException;
  import javax.xml.bind.Unmarshaller;
  
  import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.http.MediaType;
  import org.springframework.web.bind.annotation.RequestBody;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.bind.annotation.RestController;
  
  @RestController
  @Configuration
  @EnableAutoConfiguration
  public class ConfigGeneratorController {
  
      private final AtomicLong counter = new AtomicLong();
  
      Logger logger = null;
  
      @RequestMapping(value = "/configGenerator", method = {RequestMethod.POST})
      @Consumes({MediaType.APPLICATION_XML_VALUE,MediaType.APPLICATION_JSON_VALUE})
      @Produces({MediaType.TEXT_PLAIN_VALUE})
  
      public ConfigGenerator configGenerator(@RequestBody String xml) {
  
          logger = Logger.getLogger(ConfigGeneratorController.class.getName());
  
          .
          .
          .
          bunch of code
          .
          .
          .
  
          return new ConfigGenerator(counter.incrementAndGet(), String.format(actionMonitor.getGeneratedConfig().replaceAll("^\t+", "")));
      }
  
  }
  </code></pre>
  
  <p>actionMonitor.getGeneratedConfig() is the method that returns the string.</p>