Spring框架外文文献翻译.docx

上传人:聆听****声音 文档编号:263760 上传时间:2023-04-28 格式:DOCX 页数:4 大小:16.46KB
下载 相关 举报
Spring框架外文文献翻译.docx_第1页
第1页 / 共4页
Spring框架外文文献翻译.docx_第2页
第2页 / 共4页
Spring框架外文文献翻译.docx_第3页
第3页 / 共4页
Spring框架外文文献翻译.docx_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

Spring框架外文文献翻译.docx

《Spring框架外文文献翻译.docx》由会员分享,可在线阅读,更多相关《Spring框架外文文献翻译.docx(4页珍藏版)》请在冰点文库上搜索。

Spring框架外文文献翻译.docx

黑龙江工程学院本科生毕业设计

外文文献翻译



SpringFramework

Springisanopensourceframework,andSpringwaslaunchedin2003asalightweightJavadevelopmentframeworkcreatedbyRodJohnson.Inanutshell,Springisahierarchical,JavaSE/EEfull-stack (one-stop) lightweightopen source framework.The powerfulJavaBeansbasedconfigurationmanagementusingtheInversionofControl(IoC)principlemakesapplicationcomponentsfasterandeasier.

1.facilitatedecouplingandsimplifydevelopment

ThroughtheIoCcontainerprovidedbySpring,wecancontroldependenciesbetweenobjectsbySpring,avoidingexcessiveprogramcouplingcausedbyhardcoding.WithSpring,usersdonothavetowritecodeforthebottomtierrequirementsofsingleinstanceschemaclasses,properties,fileparsing,andsoon,andcanfocusmoreontoptierapplications.

2.AOPprogrammingsupport

ThroughtheSpringfunctionalityprovidedbyAOP,itiseasytoimplementfaceorientedprogramming,andmanyfeaturesthatarenoteasilyimplementedwithtraditionalOOPcanbeeasilyhandledbyAOP.

3.declarativetransactionsupport

InSpring,wecanextricateourselvesfromtediousandtedioustransactionmanagementcodeandflexiblymanagethetransactionthroughdeclarativemanner,soastoimprovetheefficiencyandqualityofdevelopment.

4.convenienceprogramtesting

Almostalltestworkcanbedoneinanoncontainerdependentprogrammingmanner,andinSpring,testingisnolongerexpensive,butsomethingtodo.Forexample,SpringsupportsJunit4andcaneasilytestSpringprogramsbyannotations.

5.convenientintegrationofvariousexcellentframework

Springdoesnotexcludeallkindsofexcellentopensourceframework,onthecontrary,SpringcanreducethedifficultyoftheuseofSpringframework,providesaframeworkforavarietyofexcellent(suchasStruts,Hibernate,Hessian,Quartz)directlysupportthe.

6.reducethedifficultyofusingJavaEEAPI

SpringprovidesathinlayerofencapsulationformanydifficultJava,EE,API(suchasJDBC,JavaMail,remotecalls,etc.),andtheuseoftheseJavaEEAPIis greatlyreducedthroughthesimplepackageofSpring.

7.Javasourcecodeisaclassicexampleoflearning

Springsourcecode,clearstructure,exquisitedesignoriginality,embodiesthemasteroftheJavadesignpatternandtheflexibleuseofJavatechnologyaccomplishment.Spring

frameworksourcecodeisundoubtedlythebestpracticeexampleofJavatechnology.IfyouwanttoquicklyimproveyourJavaskillsandapplicationdevelopmentlevelinashorttime,learningan.

TheroleofMVC-Springisintegration,butnotjustintegration,andtheSpringframeworkcanbeseenasaframeworkforenterprisesolutionlevels.Theclientsendsarequest,theservercontroller(implementedbyDispatcherServlet)tocompletetherequestforwarding,callacontrollerformappingclassHandlerMapping,theclassis usedtomaprequeststothecorrespondingprocessortoprocesstherequest.HandlerMappingwillrequestismappedtothecorrespondingprocessorController(equivalenttoAction)inSpringifyouwritesomeprocessorcomponents,thegeneralimplementationoftheControllerinterfaceinController,youcancallServiceorDAOtooperatedatafromtheDAOModelAndViewusedtostoretheretrieveddata,somedatacanalsobestoredinresponsetotheview.Ifyouwanttoreturntheresulttotheuser,italsoprovidesaviewofViewResolvercomponentinSpringframework,thecomponentlabeledControllerreturnsaccordingto,findthecorrespondingview,theresponseresponsebacktotheuser.

Eachmodule(orcomponent)thatmakesuptheSpringframeworkcanexistalone,orcanbeimplementedinconjunctionwithoneormoreothermodules.Eachmodulehasthefollowingfunctions:

1,thecorecontainer:

thecorecontainerprovidesthebasicfunctionalityoftheSpringframework(Spring,Core).ThemaincomponentofthecorecontainerisBeanFactory,whichisimplementedinfactorymode.BeanFactoryusesthecontrolinversion(IOC)patterntoseparateapplicationconfigurationanddependencyspecificationsfromtheactualapplicationcode.

Spring框架

Spring是一个开源框架,Spring是于2003年兴起的一个轻量级的Java开发框架,由RodJohnson创建。

简单来说,Spring是一个分层的JavaSE/EEfull-stack(一站式)轻量级开源框架。

强大的基于JavaBeans的采用控制反转(InversionofControl,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.降低JavaEEAPI的使用难度

Spring对很多难用的JavaEEAPI(如JDBC,JavaMail,远程调用等)提供了一个薄薄的封装层,通过Spring的简易封装,这些JavaEEAPI的使用难度大为降低。

7.Java源码是经典学习范例

Spring的源码设计精妙、结构清晰、匠心独运,处处体现着大师对Java设计模式灵活运用以及对Java技术的高深造诣。

Spring框架源码无疑是Java技术的最佳实践范例。

如果想在短时间内迅速提高自己的Java技术水平和应用开发水平,学习和研究Spring源码将会使你收到意想不到的效果。

MVC——Spring的作用是整合,但不仅仅限于整合,Spring框架可以被看做是一个企业解决方案级别的框架。

客户端发送请求,服务器控制器(由DispatcherServlet实现的)完成请求的转发,控制器调用一个用于映射的类HandlerMapping,该类用于将请求映射到对应的处理器来处理请求。

HandlerMapping将请求映射到对应的处理器Controller(相当于Action)在Spring当中如果写一些处理器组件,一般实现Controller接口,在Controller中就可以调用一些Service或DAO来进行数据操作ModelAndView用于存放从DAO中取出的数据,还可以存放响应视图的一些数据。

如果想将处理结果返回给用户,那么在Spring框架中还提供一个视图组件ViewResolver,该组件根据Controller返回的标示,找到对应的视图,将响应response返回给用户。

组成Spring框架的每个模块(或组件)都可以单独存在,或者与其他一个或多个模块联合实现。

每个模块的功能如下:

核心容器:

核心容器提供Spring框架的基本功能(SpringCore)。

核心容器的主要组件是BeanFactory,它是工厂模式的实现。

BeanFactory使用控制反转(IOC)模式将应用程序的配置和依赖性规范与实际的应

用程序代码分开。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2