Spring框架-毕业论文外文文献翻译.doc
黑龙江工程学院本科生毕业设计外文文献翻译SpringFrameworkSpring is an open source framework, and Spring was launched in 2003 as a lightweight Java development framework created by Rod Johnson. In a nutshell, Spring is a hierarchical, JavaSE/EEfull-stack (one-stop) lightweight open source framework. The powerful JavaBeans based configuration management using the Inversion of Control (IoC) principle makes application components faster and easier.1. facilitate decoupling and simplify developmentThrough the IoC container provided by Spring, we can control dependencies between objects by Spring, avoiding excessive program coupling caused by hard coding. With Spring, users do not have to write code for the bottom tier requirements of single instance schema classes, properties, file parsing, and so on, and can focus more on top tier applications.2.AOP programming supportThrough the Spring functionality provided by AOP, it is easy to implement face oriented programming, and many features that are not easily implemented with traditional OOP can be easily handled by AOP.3. declarative transaction supportIn Spring, we can extricate ourselves from tedious and tedious transaction management code and flexibly manage the transaction through declarative manner, so as to improve the efficiency and quality of development.4. convenience program testingAlmost all test work can be done in a non container dependent programming manner, and in Spring, testing is no longer expensive, but something to do. For example, Spring supports Junit4 and can easily test Spring programs by annotations.5. convenient integration of various excellent frameworkSpring does not exclude all kinds of excellent open source framework, on the contrary, Spring can reduce the difficulty of the use of Spring framework, provides a framework for a variety of excellent (such as Struts, Hibernate, Hessian, Quartz) directly support the.6. reduce the difficulty of using Java EE APISpring provides a thin layer of encapsulation for many difficult Java, EE, API (such as JDBC, JavaMail, remote calls, etc.), and the use of these Java EE API is greatly reduced through the simple package of Spring.7.Java source code is a classic example of learningSpring source code, clear structure, exquisite design originality, embodies the master of the Java design pattern and the flexible use of Java technology accomplishment. Spring framework source code is undoubtedly the best practice example of Java technology. If you want to quickly improve your Java skills and application development level in a short time, learning an.The role of MVC - Spring is integration, but not just integration, and the Spring framework can be seen as a framework for enterprise solution levels. The client sends a request, the server controller (implemented by DispatcherServlet) to complete the request forwarding, call a controller for mapping class HandlerMapping, the class is used to map requests to the corresponding processor to process the request. HandlerMapping will request is mapped to the corresponding processor Controller (equivalent to Action) in Spring if you write some processor components, the general implementation of the Controller interface in Controller, you can call Service or DAO to operate data from the DAO ModelAndView used to store the retrieved data, some data can also be stored in response to the view. If you want to return the result to the user, it also provides a view of ViewResolver component in Spring framework, the component labeled Controller returns according to, find the corresponding view, the response response back to the user.Each module (or component) that makes up the Spring framework can exist alone, or can be implemented in conjunction with one or more other modules. Each module has the following functions: 1, the core container: the core container provides the basic functionality of the Spring framework (Spring, Core). The main component of the core container is BeanFactory, which is implemented in factory mode. BeanFactory uses the control inversion (IOC) pattern to separate application configuration and dependency specifications from the actual application code. Spring框架Spring是一个开源框架,Spring是于2003 年兴起的一个轻量级的Java 开发框架,由Rod Johnson创建。简单来说,Spring是一个分层的JavaSE/EEfull-stack(一站式) 轻量级开源框架。强大的基于 JavaBeans的采用控制反转(Inversion of Control,IoC)原则的配置管理,使得应用程序的组件更加快捷简易。1.方便解耦,简化开发通过Spring提供的IoC容器,我们可以将对象之间的依赖关系交由Spring进行控制,避免硬编码所造成的过度程序耦合。有了Spring,用户不必再为单实例模式类、属性文件解析等这些很底层的需求编写代码,可以更专注于上层的应用。2.AOP编程的支持通过Spring提供的AOP功能,方便进行面向切面的编程,许多不容易用传统OOP实现的功能可以通过AOP轻松应付。3.声明式事务的支持在Spring中,我们可以从单调烦闷的事务管理代码中解脱出来,通过声明式方式灵活地进行事务的管理,提高开发效率和质量。4.方便程序的测试可以用非容器依赖的编程方式进行几乎所有的测试工作,在Spring里,测试不再是昂贵的操作,而是随手可做的事情。例如:Spring对Junit4支持,可以通过注解方便的测试Spring程序。5.方便集成各种优秀框架Spring不排斥各种优秀的开源框架,相反,Spring可以降低各种框架的使用难度,Spring提供了对各种优秀框架(如Struts,Hibernate、Hessian、Quartz)等的直接支持。6.降低Java EE API的使用难度Spring对很多难用的Java EE API(如JDBC,JavaMail,远程调用等)提供了一个薄薄的封装层,通过Spring的简易封装,这些Java EE API的使用难度大为降低。7.Java 源码是经典学习范例Spring的源码设计精妙、结构清晰、匠心独运,处处体现着大师对Java设计模式灵活运用以及对Java技术的高深造诣。Spring框架源码无疑是Java技术的最佳实践范例。如果想在短时间内迅速提高自己的Java技术水平和应用开发水平,学习和研究Spring源码将会使你收到意想不到的效果。MVCSpring的作用是整合,但不仅仅限于整合,Spring 框架可以被看做是一个企业解决方案级别的框架。客户端发送请求,服务器控制器(由DispatcherServlet实现的)完成请求的转发,控制器调用一个用于映射的类HandlerMapping,该类用于将请求映射到对应的处理器来处理请求。HandlerMapping 将请求映射到对应的处理器Controller(相当于Action)在Spring 当中如果写一些处理器组件,一般实现Controller 接口,在Controller 中就可以调用一些Service 或DAO 来进行数据操作 ModelAndView 用于存放从DAO 中取出的数据,还可以存放响应视图的一些数据。 如果想将处理结果返回给用户,那么在Spring 框架中还提供一个视图组件ViewResolver,该组件根据Controller 返回的标示,找到对应的视图,将响应response 返回给用户。组成Spring框架的每个模块(或组件)都可以单独存在,或者与其他一个或多个模块联合实现。每个模块的功能如下:核心容器:核心容器提供 Spring 框架的基本功能(Spring Core)。核心容器的主要组件是 BeanFactory,它是工厂模式的实现。BeanFactory 使用控制反转(IOC) 模式将应用程序的配置和依赖性规范与实际的应用程序代码分开。