Spring MVC 员工管理系统

上传者: ymaitak | 上传时间: 2022-05-17 10:52:37 | 文件大小: 5.1MB | 文件类型: RAR
大部分Java应用都是Web应用,展现层是Web应用不可忽略的重要环节。Spring为展现层提供了一个优秀的Web框架——Spring MVC。和众多其它Web框架一样,它基于MVC设计理念,此外,由于它采用了松散耦合可插拔组件结构,具有比其它MVC框架更多的扩展性和灵活性。 Spring MVC框架围绕DispatcherServlet这个核心展开,DispatcherServlet的作用是截获请求并组织一系列组件共同完成请求的处理工作。 JavaServer Faces (JSF) 是一种用于构建 Web 应用程序的新标准 Java 框架。它提供了一种以组件为中心来开发 Java Web 用户界面的方法,从而简化了开发。JavaServer Faces 还引起了广大 Java/Web 开发人员的兴趣。“企业开发人员”和 Web 设计人员将发现 JSF 开发可以简单到只需将用户界面 (UI) 组件拖放到页面上,而“系统开发人员”将发现丰富而强健的 JSF API 为他们提供了无与伦比的功能和编程灵活性。JSF 还通过将良好构建的模型-视图-控制器 (MVC) 设计模式集成到它的体系结构中,确保了应用程序具有更高的可维护性。最后,由于 JSF 是通过 Java Community Process (JCP) 开发的一种 Java 标准,因此开发工具供应商完全能够为 JavaServer Faces 提供易于使用的、高效的可视化开发环境。 ① 整个过程开始于客户端发送一个HTTP请求; ② DispatcherServlet接收这个请求后,并将请求的处理工作委托给具体的处理器(Handler),后者负责处理请求执行相应的业务逻辑。在这之前,DispatcherServlet必须能够凭借请求信息(URL或请求参数等)按照某种机制找到请求对应的处理器,DispatcherServlet是通过垂询HandlerMapping完成这一工作的; ③ 当DispatcherServlet从HandlerMapping中得到当前请求对应的处理器后,它就将请求分派给这个处理器。处理器根据请求的信息执行相应的业务逻辑,一个设计良好的处理器应该通过调用Service层的业务对象完成业务处理,而非自己越俎代庖。 Spring提供了丰富的处理器类型,在真正处理业务逻辑前,有些处理器会事先执行两项预处理工作: 1)将HttpServletRequest请求参数绑定到一个POJO对象中; 2)对绑定了请求参数的POJO对象进行数据合法性校验; ④ 处理器完成业务逻辑的处理后将返回一个ModelAndView给DispatcherServlet,ModelAndView包含了视图逻辑名和渲染视图时需要用到的模型数据对象; ⑤ 由于ModelAndView中包含的是视图逻辑名,DispatcherServlet必须知道这个逻辑名对应的真实视图对象,这项视图解析的工作通过调用ViewResolver来完成; ⑥ 当得到真实的视图对象后,DispatcherServlet将请求分派给这个View对象,由其完成Model数据的渲染工作; ⑦ 最终客户端得到返回的响应,这可能是一个普通的HTML页面,也可能是一个Excel电子表格、甚至是一个PDF文档等不一而足的视图形式,Spring的视图类型是异常丰富和灵活的。

文件下载

资源详情

[{"title":"( 68 个子文件 5.1MB ) Spring MVC 员工管理系统","children":[{"title":"SpringMVC","children":[{"title":"WebContent","children":[{"title":"META-INF","children":[{"title":"MANIFEST.MF <span style='color:#111;'> 39B </span>","children":null,"spread":false}],"spread":true},{"title":"WEB-INF","children":[{"title":"test-servlet.xml <span style='color:#111;'> 1.98KB </span>","children":null,"spread":false},{"title":"view-servlet.xml <span style='color:#111;'> 2.76KB </span>","children":null,"spread":false},{"title":"web.xml <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false},{"title":"jsp","children":[{"title":"updata.jsp <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"start.jsp <span style='color:#111;'> 395B </span>","children":null,"spread":false},{"title":"login.jsp <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"addemp.jsp <span style='color:#111;'> 1.80KB </span>","children":null,"spread":false},{"title":"query.jsp <span style='color:#111;'> 3.92KB </span>","children":null,"spread":false},{"title":"fail.jsp <span style='color:#111;'> 2.42KB </span>","children":null,"spread":false},{"title":"success.jsp <span style='color:#111;'> 380B </span>","children":null,"spread":false}],"spread":true},{"title":"lib","children":[{"title":"com.springsource.org.apache.commons.logging-1.1.1.jar <span style='color:#111;'> 60.02KB </span>","children":null,"spread":false},{"title":"org.springframework.web.struts-3.1.1.RELEASE.jar <span style='color:#111;'> 30.67KB </span>","children":null,"spread":false},{"title":"org.springframework.beans-3.1.1.RELEASE.jar <span style='color:#111;'> 576.00KB </span>","children":null,"spread":false},{"title":"org.springframework.context-3.1.1.RELEASE.jar <span style='color:#111;'> 811.59KB </span>","children":null,"spread":false},{"title":"org.springframework.asm-3.1.1.RELEASE.jar <span style='color:#111;'> 51.84KB </span>","children":null,"spread":false},{"title":"sqljdbc4.jar <span style='color:#111;'> 455.43KB </span>","children":null,"spread":false},{"title":"org.springframework.core-3.1.1.RELEASE.jar <span style='color:#111;'> 438.79KB </span>","children":null,"spread":false},{"title":"jstl.jar <span style='color:#111;'> 20.20KB </span>","children":null,"spread":false},{"title":"org.springframework.context.support-3.1.1.RELEASE.jar <span style='color:#111;'> 104.71KB </span>","children":null,"spread":false},{"title":"org.springframework.expression-3.1.1.RELEASE.jar <span style='color:#111;'> 172.18KB </span>","children":null,"spread":false},{"title":"org.springframework.transaction-3.1.1.RELEASE.jar <span style='color:#111;'> 240.94KB </span>","children":null,"spread":false},{"title":"classes12.jar <span style='color:#111;'> 1.52MB </span>","children":null,"spread":false},{"title":"org.springframework.web.portlet-3.1.1.RELEASE.jar <span style='color:#111;'> 186.49KB </span>","children":null,"spread":false},{"title":"org.springframework.web-3.1.1.RELEASE.jar <span style='color:#111;'> 531.53KB </span>","children":null,"spread":false},{"title":"org.springframework.web.servlet-3.1.1.RELEASE.jar <span style='color:#111;'> 560.25KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":".settings","children":[{"title":"org.eclipse.wst.jsdt.ui.superType.name <span style='color:#111;'> 6B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.project.facet.core.xml <span style='color:#111;'> 345B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.component <span style='color:#111;'> 408B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.jsdt.ui.superType.container <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":".jsdtscope <span style='color:#111;'> 503B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 395B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"net","children":[{"title":"spring","children":[{"title":"dao","children":[{"title":"EmpDao.java <span style='color:#111;'> 381B </span>","children":null,"spread":false},{"title":"UserDao.java <span style='color:#111;'> 930B </span>","children":null,"spread":false},{"title":"impl","children":[{"title":"EmpDaoImpl.java <span style='color:#111;'> 5.57KB </span>","children":null,"spread":false},{"title":"EmpDaoImpl.java.bak <span style='color:#111;'> 5.64KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"po","children":[{"title":"User.java <span style='color:#111;'> 387B </span>","children":null,"spread":false},{"title":"Emp.java <span style='color:#111;'> 946B </span>","children":null,"spread":false},{"title":"SplitPage.java <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"controll","children":[{"title":"MultiController.java <span style='color:#111;'> 816B </span>","children":null,"spread":false},{"title":"LoginController.java <span style='color:#111;'> 882B </span>","children":null,"spread":false},{"title":"ControllView.java <span style='color:#111;'> 567B </span>","children":null,"spread":false},{"title":"Controller.java <span style='color:#111;'> 498B </span>","children":null,"spread":false},{"title":"CommandController.java <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false},{"title":"AutoAllController.java <span style='color:#111;'> 2.04KB </span>","children":null,"spread":false},{"title":"ParamController.java <span style='color:#111;'> 551B </span>","children":null,"spread":false},{"title":"AddEmpController.java <span style='color:#111;'> 778B </span>","children":null,"spread":false}],"spread":true},{"title":"service","children":[{"title":"EmpService.java <span style='color:#111;'> 516B </span>","children":null,"spread":false},{"title":"UserService.java <span style='color:#111;'> 346B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 1.01KB </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 841B </span>","children":null,"spread":false},{"title":"bean.xml <span style='color:#111;'> 248B </span>","children":null,"spread":false},{"title":"build","children":[{"title":"classes","children":[{"title":"com","children":[{"title":"net","children":[{"title":"spring","children":[{"title":"dao","children":[{"title":"UserDao.class <span style='color:#111;'> 1.64KB </span>","children":null,"spread":false},{"title":"EmpDao.class <span style='color:#111;'> 523B </span>","children":null,"spread":false},{"title":"impl","children":[{"title":"EmpDaoImpl.class <span style='color:#111;'> 5.90KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"po","children":[{"title":"User.class <span style='color:#111;'> 729B </span>","children":null,"spread":false},{"title":"Emp.class <span style='color:#111;'> 1.67KB </span>","children":null,"spread":false},{"title":"SplitPage.class <span style='color:#111;'> 2.04KB </span>","children":null,"spread":false}],"spread":true},{"title":"controll","children":[{"title":"ParamController.class <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false},{"title":"ControllView.class <span style='color:#111;'> 1022B </span>","children":null,"spread":false},{"title":"LoginController.class <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false},{"title":"AddEmpController.class <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"CommandController.class <span style='color:#111;'> 1.84KB </span>","children":null,"spread":false},{"title":"AutoAllController.class <span style='color:#111;'> 2.83KB </span>","children":null,"spread":false},{"title":"MultiController.class <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"Controller.class <span style='color:#111;'> 902B </span>","children":null,"spread":false}],"spread":false},{"title":"service","children":[{"title":"EmpService.class <span style='color:#111;'> 970B </span>","children":null,"spread":false},{"title":"UserService.class <span style='color:#111;'> 820B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明