SpringMVC从入门到精通
文章平均质量分 68
收集和整理了自己在教学和使用SpringMVC过程中的相关资料,希望通过实战的形式,引导大家通过一个个案例的学习,从入门直到精通。
老实先生
共同学习
展开
-
SpringMVC案例五:@ModelAttribute
控制器中:@Autowiredprivate DeptService deptService;@ModelAttribute("deptList")public List<Dept> getAllDept(){ return this.deptService.getAll();}@RequestMapping("testModelAttribute")public ...原创 2018-11-06 14:33:54 · 220 阅读 · 0 评论 -
SpringMVC案例四:处理器方法返回void
SpringMVC案例四:处理器方法返回void@RequestMapping("testVoid")public void testVoid(HttpServletResponse response) throws IOException { response.getWriter().print("true");}返回void(当返回类型为Void的时候,则响应的视图页面为对应着的访...原创 2018-11-06 14:23:23 · 681 阅读 · 0 评论 -
SpringMVC案例二:使用控制器进行请求处理
案例二:使用控制器进行请求处理创建类,实现Controller接口import org.springframework.web.servlet.ModelAndView;import org.springframework.web.servlet.mvc.Controller;public class HelloController implements Controller { ...原创 2018-11-06 13:56:23 · 295 阅读 · 0 评论 -
SpringMVC案例三:使用注解驱动来配置控制器
SpringMVC案例三:注解驱动来配置控制器在springmvc.xml中context、mvc命名空间添加组件扫描<context:component-scan base-package="com.yy.controller"></context:component-scan>添加注解驱动支持<mvc:annotation-driven&a原创 2018-11-06 14:16:10 · 571 阅读 · 0 评论 -
利用MVC(SpringMVC+Spring+MyBatis)实现购物车——试题讲解
利用MVC(SpringMVC+Spring+MyBatis)实现购物车本试题使用Jsp+Spring+Mybatis+Mysql+Maven等技术实现购物车管理。语言和环境A、实现语言JavaB、环境要求JDK1.8、Eclipse、Tomcat7、SpringMVC、Spring、Mybatis、Mysql、Maven功能要求分页显示商品表中信息,如下图点击购买,显示购物车...原创 2018-11-05 11:27:42 · 10542 阅读 · 4 评论 -
SSM分页解决方案-Bootstrap
SSM分页解决方案一、mybatis分页插件--Mybatis-PageHelper1.下载 https://github.com/pagehelper/Mybatis-PageHelper2.mybatis中最方便的分页插件,支持单表和多表分页查询。3.要使用PageHelper,只需要在类路径中包含 pagehelper-xxx.jar 和jsqlparser-0.9.5.j...原创 2018-11-03 07:06:33 · 420 阅读 · 0 评论 -
SSM分页解决方案-easyui
SSM分页解决方案-easyuimybatis分页插件–Mybatis-PageHelper下载https://github.com/pagehelper/Mybatis-PageHelpermybatis中最方便的分页插件,支持单表和多表分页查询。要使用PageHelper,只需要在类路径中包含 pagehelper-xxx.jar 和jsqlparser-0.9.5.ja...原创 2018-11-04 11:34:34 · 440 阅读 · 0 评论 -
Spring MVC 案例一:环境配置
Spring MVC 案例一:环境配置maven导入jar包<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --><dependency> <groupId>org.springframework</groupId> <...原创 2018-11-06 11:17:21 · 182 阅读 · 0 评论 -
Spring MVC 学习笔记
Spring MVC 学习笔记使用Servlet做控制器存在的问题:同一个Servlet中处理多个请求比较麻烦BankServelt?method=insertBankServelt?method=get请求参数的获取和类型转换需要手工编码响应jsp页面路径在Servlet中写死一、概述spring mvc是spring框架的一个模块,springmvc与spring无需通过...原创 2018-11-06 10:53:58 · 452 阅读 · 0 评论