@Controller @RequestMapping("/zhangpn") public class Hello { @RequestMapping("/hello") public String Hello() { System.out.println("**************hello*******************"); return "success"; } }
访问路径url应为http://localhost:8080/SpringMVC/zhangpn/hello
与struts2中的包的命名空间和action的名称规则类似