首页 | 本学科首页   官方微博 | 高级检索  
     

基于Spring MVC框架的Java Web应用
引用本文:葛 萌,黄素萍,欧阳宏基. 基于Spring MVC框架的Java Web应用[J]. 计算机与现代化, 2018, 0(8): 97. DOI: 10.3969/j.issn.1006-2475.2018.08.018
作者姓名:葛 萌  黄素萍  欧阳宏基
基金项目:陕西省教育厅专项科研计划项目(17JK0828); 咸阳师范学院专项科研计划项目(XSYK17029)
摘    要:基于MVC模式的Web框架能够分离应用的视图、模型和控制器,并能简化控制层的实现,在此研究上提出基于Spring MVC框架的Java Web应用开发方法。首先分析了Spring MVC框架的核心组件以及组件之间的交互过程。然后根据配置文件、Controller组件的实现这2个方面阐述Spring MVC框架的基本应用。最后以异常处理、拦截器和数据校验这3个Web应用中的核心问题给出了Spring MVC的解决方案,以目标考核管理系统为背景给出了部分实现代码。实验表明Spring MVC框架能够提高Java Web应用的稳定性、扩展性和维护性。

关 键 词:Spring MVC框架  控制器  异常处理  拦截器  数据校验  
收稿时间:2018-09-11

Java Web Application Based on Spring MVC Framework
GE Meng,HUANG Su-ping,OUYANG Hong-ji. Java Web Application Based on Spring MVC Framework[J]. Computer and Modernization, 2018, 0(8): 97. DOI: 10.3969/j.issn.1006-2475.2018.08.018
Authors:GE Meng  HUANG Su-ping  OUYANG Hong-ji
Abstract:The Web framework based on MVC mode can separate the view, model, and controller of the application, and can simplify the implementation of the control layer. This paper proposes the development method of Java Web application based on Spring MVC framework. First, it analyzes the core components of the Spring MVC framework and the interaction process between them. Second, the basic application of the Spring MVC framework is expounded from two aspects of the configuration file and the implementation of Controller component. Finally, the solution of Spring MVC is given for the three core problems of Web application which are exception handling, interceptor and data validation, Taking the target assessment management system as an example, a part of the implementation code is given. The experiment shows that the Spring MVC framework can improve the stability, scalability and maintainability of Java Web applications.
Keywords:Spring MVC framework  controller  exception handle  interceptor  data validation  
点击此处可从《计算机与现代化》浏览原始摘要信息
点击此处可从《计算机与现代化》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号