title: Spring Error Response auto converted to Html from JSON
body: <p>I am getting error response correctly when I am running the project in my end.</p>
  
  <pre><code>{
   "timestamp": "2018-05-30T10:16:00.065+0000",
   "status": 500,
   "error": "Internal Server Error",
   "message": "No login found for username :string",
   "path": "/gatepass/api/v1/logins/login"
   }
  </code></pre>
  
  <p>But when I deploy on server It automatically converts to HTML. How to fix this?</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
     &lt;head&gt;
        &lt;title&gt;HTTP Status 500 – Internal Server Error&lt;/title&gt;
        &lt;style type="text/css"&gt;h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}&lt;/style&gt;
     &lt;/head&gt;
     &lt;body&gt;
        &lt;h1&gt;HTTP Status 500 – Internal Server Error&lt;/h1&gt;
        &lt;hr class="line" /&gt;
        &lt;p&gt;&lt;b&gt;Type&lt;/b&gt; Status Report&lt;/p&gt;
        &lt;p&gt;&lt;b&gt;Message&lt;/b&gt; No login found for username :string&lt;/p&gt;
        &lt;p&gt;&lt;b&gt;Description&lt;/b&gt; The server encountered an unexpected condition that prevented it from fulfilling the request.&lt;/p&gt;
        &lt;hr class="line" /&gt;
        &lt;h3&gt;Apache Tomcat/8.5.27&lt;/h3&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>