title: Spring RestTemplate.postForEntry, returns 403 error
body: <p>I want to communicate with a server in Java area by utilizing RestTemplate class.
  But when I access to my server with RestTemplate, it shows just 403(forbidden) error.</p>
  
  <p>my controller code :</p>
  
  <pre><code>@Controller(value="homeController")
  public class HomeController {
  
  @RequestMapping(value="/test")
  public @ResponseBody Map&lt;String, String&gt; test(@RequestParam(value="message", required=false, defaultValue="hell world") String message){
  
      Map&lt;String, String&gt; map = new HashMap&lt;String,String&gt;();
      map.put("greeting", message);
  
      return map;
  }
  </code></pre>
  
  <p>client side's code:</p>
  
  <pre><code>@Test
  public void test2(){
      HttpHeaders headers = new HttpHeaders();
      headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
  
      MultiValueMap&lt;String, String&gt; map= new LinkedMultiValueMap&lt;String, String&gt;();
      map.add("message", "test");
  
      HttpEntity&lt;MultiValueMap&lt;String, String&gt;&gt; request = new HttpEntity&lt;MultiValueMap&lt;String, String&gt;&gt;(map, headers);
  
      ResponseEntity&lt;String&gt; response = restTemplate.postForEntity( url, request , String.class );
      System.out.println(response.getBody());
  
  }
  </code></pre>
  
  <p>If the code works successfully, console should output "test" word.</p>
  
  <p><strong>EDIT:</strong>
  When I access to the controller, with my web browser, it shows json data correctly.</p>
  
  <p>Now,
  How do I fix the code to communicate to server on POST method ?
  thanks</p>