1.概述 Spring MVC框架提供了功能强大的注解,大大简化了代码开发的同时也提升了程序的可扩展性 2.注解 2.1.@RequestMapping Spring MVC通过@RequestMapper 注解将URL请求与业务方法进行映射 在控制器的类定义处以及方法定义处都可添加@RequestMapper,在类定义处添加@RequestMapping注解,相当于多了一层访问路径 @RequestMapping("/")public class IndexController {…
一.SpringMVC基础入门,创建一个HelloWorld程序 1.首先,导入SpringMVC需要的jar包. 2.添加Web.xml配置文件中关于SpringMVC的配置 <!--configure the setting of springmvcDispatcherServlet and configure the mapping--> <servlet> <servlet-name>springmvc</servlet-name> <serv…