title: spring-hateoas with `use-hal-as-default-json-media-type=false` still response `application/hal+json` by default
body: <p>I want to disable HAL format by default.</p>
  
  <p>Flow the document, I set this property.</p>
  
  <pre><code>spring.hateoas.use-hal-as-default-json-media-type=false
  </code></pre>
  
  <p>Then test it:</p>
  
  <p><strong>1. Request with header <code>Accept: application/json</code>.</strong></p>
  
  <p>Header: <code>Content-Type: application/json;charset=UTF-8</code></p>
  
  <p>Response:</p>
  
  <pre><code>{
    "links": {}
  }
  </code></pre>
  
  <p><strong>2. Request with header <code>Accept: */*</code> or without <code>Accept</code> header.</strong></p>
  
  <p>Header: <code>Content-Type: application/hal+json;charset=UTF-8</code></p>
  
  <p>Response:</p>
  
  <pre><code>{
    "_embedded": {},
    "_links": {}
  }
  </code></pre>
  
  <p>The version of <code>spring-boot</code> is 1.5.3, and I use <code>spring-boot-starter-hateoas</code>.</p>
  
  <p>Is anyway let hateoas to response json without HAL when no header specified?</p>
  
  <p>Thanks a lot.</p>
  
  <hr>
  
  <p><strong>Update:</strong></p>
  
  <p>Here is a example base on <a href="https://spring.io/guides/gs/rest-hateoas/" rel="nofollow noreferrer">the guide from spring.io</a>.</p>
  
  <p>Requests at: <code>http://localhost:8080/greeting</code></p>
  
  <p>Requests with header <code>Accept: */*</code>.</p>
  
  <pre><code>HTTP/1.1 200 
  Content-Type: application/hal+json;charset=UTF-8
  
  {
    "content":"Hello, World!",
    "_links":{
      "self":{
        "href":"http://localhost:8080/greeting?name=World"
      }
    }
  }
  </code></pre>
  
  <p>Requests with header <code>Accept: application/json</code>.</p>
  
  <pre><code>HTTP/1.1 200 
  Content-Type: application/json;charset=UTF-8
  
  {
    "content":"Hello, World!",
    "_links":{
      "self":{
        "href":"http://localhost:8080/greeting?name=World"
      }
    }
  }
  </code></pre>
  
  <p>I don't want HAL by default, so I add a config file <code>resources/application.properties</code> to the project.</p>
  
  <pre><code>spring.hateoas.use-hal-as-default-json-media-type=false
  </code></pre>
  
  <p>And test again.</p>
  
  <p>Requests with header <code>Accept: */*</code>.</p>
  
  <pre><code>HTTP/1.1 200 
  Content-Type: application/hal+json;charset=UTF-8
  
  {
    "content":"Hello, World!",
    "_links":{
      "self":{
        "href":"http://localhost:8080/greeting?name=World"
      }
    }
  }
  </code></pre>
  
  <p>Requests with header <code>Accept: application/json</code>.</p>
  
  <pre><code>HTTP/1.1 200 
  Content-Type: application/json;charset=UTF-8
  
  {
    "content":"Hello, World!",
    "links":[
      {
        "rel":"self",
        "href":"http://localhost:8080/greeting?name=World"
      }
    ]
  }
  </code></pre>