|  On class level @RequestMapping or @RequestMapping("") will map to only root url "/".  Example@Controller
@RequestMapping("")
public class MyController {
  @ResponseBody
  @RequestMapping
  public String handler() {
      return "response from handler()";
  }
}
                        
                     Running exampleTo try examples, run embedded tomcat (configured in pom.xml of example project below): mvn tomcat7:run-warOutput    Check out this example as well when @RequestMapping without path is used on method level.  
 
 
 Example ProjectDependencies and Technologies Used: spring-webmvc 5.0.4.RELEASE: Spring Web MVC.javax.servlet-api 3.0.1 Java Servlet APIJDK 1.8Maven 3.3.9
 
 |