在Controller 层使用 @RequestMapping注解,需要导入的包:spring-webmvc。
在类中需要添加:import org.springframework.web.bind.annotation.RequestMapping;
本文参考了:http://www.cnblogs.com/JavaTechLover/archive/2012/09/03/spring-controller2.html
里面有详细的讲解!
本文详细介绍了在 Spring MVC 中如何使用 @RequestMapping 注解,包括其基本语法、配置方式及常见应用场景。通过实例演示了如何在 Controller 层正确导入 spring-webmvc 并使用该注解。
在Controller 层使用 @RequestMapping注解,需要导入的包:spring-webmvc。
在类中需要添加:import org.springframework.web.bind.annotation.RequestMapping;
本文参考了:http://www.cnblogs.com/JavaTechLover/archive/2012/09/03/spring-controller2.html
里面有详细的讲解!
转载于:https://www.cnblogs.com/JAVA-STUDYER/p/7125407.html
1203
237
984

被折叠的 条评论
为什么被折叠?