title: Spring MVC using same path on endpoints to return different content?
body: <p>I'm going to use a very basic hello world endpoint as an example</p>
  
  <pre><code> @RequestMapping("/hello")
   public String hello(@RequestParam(value="name", required=false, defaultValue="World") String name, Model model) {
       model.addAttribute("name", name);
       return "helloworld";
   }
  </code></pre>
  
  <p>If I have this endpoint and I want to be able to go to /hello and retrieve the <code>helloworld</code> view.</p>
  
  <p>Is it possible for me to use the SAME <code>/hello</code> path to retrieve model as json if I pass in a specific request param like content-type?</p>