title: Spring MVC @RequestMapping ... using method name as action value?
body: <p>Say I have this:</p>
  
  <pre><code>@RequestMapping(value="/hello")
  public ModelAndView hello(Model model){
  
      System.out.println("HelloWorldAction.sayHello");
      return null;      
  }   
  </code></pre>
  
  <p>Is it possible to skip the value="hello" part, and just have the @RequestMapping annotation and have spring use the method name as the value, similar to this:</p>
  
  <pre><code>@RequestMapping
  public ModelAndView hello(Model model){
  
      System.out.println("HelloWorldAction.sayHello");
      return null;      
  }
  </code></pre>
  
  <p>Thanks!</p>
  
  <p><strong>===================EDIT=====================</strong></p>
  
  <p>Tried this but not working:</p>
  
  <pre><code>@Controller
  @RequestMapping(value="admin", method=RequestMethod.GET)
  public class AdminController {
  
      @RequestMapping
      public ResponseEntity&lt;String&gt; hello() { 
        System.out.println("hellooooooo");
      }
  
  
  }
  </code></pre>