毕业设计外文文献-sping boot介绍_第1页
毕业设计外文文献-sping boot介绍_第2页
毕业设计外文文献-sping boot介绍_第3页
毕业设计外文文献-sping boot介绍_第4页
毕业设计外文文献-sping boot介绍_第5页
全文预览已结束

付费下载

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

附录A外文翻译—原文部分毋庸置疑,SpringBoot在众多从事Java微服务开发的程序员群体中是一个很特别的存在。说它特别是因为它确实简化了基于Spring技术栈的应用/微服务开发过程,使得我们能够很快速地就搭建起一个应用的脚手架并在其上进行项目的开发,再也不用像以前那样使用大量的XML或是注解了,应用在这样的约定优于配置的前提下可以以最快的速度创建出来。SpringBoot从这一点来说极大解放了开发者,使得开发者从之前繁琐的配置中解脱出来,转而专注于应用的业务逻辑开发。这样,我们的系统的开发周期就会大大缩短,交付周期也越来越频繁了,这同样也是SpringBoot为我们广大开发者所带来的巨大好处。我们可以尽情享受这样一个优秀框架在方方面面所带来的功能,甚至很多功能都可以做到开箱即用,只需在POM或是build.gradle中简单配置一下即可,相比于之前的SpringMVC等传统的Web开发模式来说简化了太多太多。总的来说,SpringBoot在如下几个方面为我们带来了巨大的效能提升:约定优于配置。按照SpringBoot的方式进行简单的配置后,功能就可以直接使用了。1.自动装配。SpringBoot在启动时会自动探测类路径下的各种类型,实现类型的自动装配,无需开发者再通过XML或是注解进行显式的类型装配了,这一点要拜@EnableAutoConfiguration注解或是更为全面的@SpringBootApplication注解所赐。内嵌各种Servlet容器。2.SpringBoot内嵌了Tomcat、Jetty与Undertow等Servlet容器,使得我们可以像开发普通的Java应用那样直接通过main方法来启动容器,甚至可以直接通过jar包而非war包的形式就能够实现快速部署,不必再依赖于外部的Servlet容器。3.yml配置的支持。yml或是yaml的全称是YAMLAin'tMarkupLanguage的简称(有意思的是,当初在开发这门语言时,其简称实际上是YetAnotherMarkupLanguage),新的简称采取了递归的方式。这种新的语言可以看作是传统的properties配置文件的一种有益补充,它通过缩进的方式来表示层次化的配置项,相比于传统的properties属性文件来说,其层次感会更好一些;当然,顺便也可以让我们少敲一些字母。4.提供了各种starter便于功能的开箱即用。围绕着SpringBoot生态圈目前已经涌现出了不计其数的starter,这样我们只需将相应的starter配置项引入到项目中即可很方便地使用对应的功能。提供了各种度量。SpringBoot提供了各种度量属性,便于我们查看当前项目的运行情况以及系统使用情况。SpringBoot所提供的功能非常之多,上面不过是列举出了它诸多功能的几个方面而已。SpringBoot非常方便,简单,拿来就用。这是SpringBoot自身的优良特性给开发人员所带来的最大的一个误解。对于SpringBoot来说,显然它采取的是第一种策略,即将复杂性封装起来,向使用者暴露简单的接口,让开发者能够快速上手。但显然,我们所开发的系统不可能是那么简单的,它或多或少地需要使用很多其他很多技术,当这些技术被集成到SpringBoot中时,很多问题就开始暴露出来了,这时的你如果没有扎实的基础,就会陷入遇到一个问题就到处搜结果的窘境,结果造成一天下来疲于搜索答案。经过了一段时间,你可能会反问自己:这是我要的SpringBoot么?怎么感觉还不如使用传统的SpringMVC开发速度快呢?当我们使用传统的开发模式时,大多数内容都是我们自己来设置的;在这种情况下,系统出现了问题后,我们能够比较快地定位到问题所在;然而,在SpringBoot中,因为一切都是自动装配的,因此一旦出现问题,定位问题就是一个非常耗时耗力的事情。SpringBoot的配置方式简单,更加优越。我相信,这也是很多开发者在使用SpringBoot时所得出的一个结论。但是,我想问题的是,YAML真的就比properties强大很多么(当然,SpringBoot对于这两种方式都是支持的)。如果你的配置项很多,而且都放到了application.yml中时(特别地,将各种profile配置也都放到了这里),那你再来看看你的yml文件,你还会有良好的心情么?SpringBoot项目一旦出现问题,特别是那种自动配置出现问题,或是同一个类型有几个对应项时,排查起来不是那么容易的事情,尤其在项目规模比较庞大时更是如此。这就需要你对SpringBoot的底层有良好的掌握与认知才能较快地找出问题所在。配置的加载。我相信很多做SpringBoot开发的程序员们都读过网上关于SpringBoot配置信息加载优先级的文章。姑且不论这些文章的正确与否,你是否真正理解了配置信息优先级问题,SpringBoot是如何处理配置信息的加载优先级的。

附录B外文翻译—译文部分ThereisnodoubtthatSpringBootisaveryspecialplaceamongmanyprogrammersworkingonJavamicroservicesdevelopment.It'sespeciallybecauseitreallysimplifiestheapplication/microservicedevelopmentprocessbasedontheSpringtechnologystack,sothatwecanquicklybuildanapplicationscaffoldinganddevelopprojectsonit,nolongerneedtouseitasbefore.AlargeamountofXMLorannotations,theapplicationcanbecreatedasquicklyaspossibleundersuchpremisethattheconfigurationisbetterthantheconfiguration.SpringBoothasgreatlyliberateddevelopersfromthispoint,freeingdevelopersfromthetediousconfigurationoftheprevious,andinsteadfocusedontheapplicationofbusinesslogicdevelopment.Inthisway,thedevelopmentcycleofoursystemwillbegreatlyshortened,andthedeliverycyclewillbemoreandmorefrequent.ThisisalsothegreatbenefitthatSpringBootbringstoourdevelopers.Wecanenjoythefunctionsbroughtbysuchagoodframeworkinallaspects,andevenmanyfunctionscanbeusedoutofthebox,justconfigureitinPOMorbuild.gradle,comparedtothepreviousSpring.TraditionalwebdevelopmentmodelssuchasMVChavesimplifiedtoomuch.Ingeneral,SpringBootbringsustremendousperformanceimprovementsinthefollowingareas:Theconventionisbetterthantheconfiguration.AftersimpleconfigurationinSpringBootmode,thefunctionscanbeuseddirectly.1.Automaticassembly.SpringBootautomaticallydetectsvarioustypesundertheclasspathatstartup,andimplementsautomaticassemblyoftypes.ItdoesnotrequiredeveloperstoperformexplicittypeassemblyviaXMLorannotations.Thisissubjectto@EnableAutoConfigurationannotationormore.Thefull@SpringBootApplicationannotationisgiven.EmbedvariousServletcontainers.2.SpringBootembedsServletcontainerssuchasTomcat,JettyandUndertow,sothatwecanstartthecontainerdirectlythroughthemainmethodjustlikedevelopinganormalJavaapplication,orevendirectlythroughthejarpackageinsteadofthewarpackage.Deploy,nolongerhavetorelyonexternalservletcontainers.3.Supportforymlconfiguration.ThefullnameofymloryamlisshortforYAMLAin'tMarkupLanguage(interestingly,whenthelanguagewasoriginallydeveloped,theabbreviationisactuallyYetAnotherMarkupLanguage),thenewabbreviationtakesarecursiveapproach.Thisnewlanguagecanbeseenasausefulcomplementtothetraditionalpropertiesconfigurationfile,whichrepresentsthehierarchicalconfigurationitemsbyindentation.Comparedtothetraditionalpropertiespropertyfile,thelayeringwillbemoreBetter;ofcourse,bytheway,wecanknockoutsomeletters.4.Providesavarietyofstarterfunctionsforoutofthebox.AroundtheSpringBootecosystem,therearecountlessstarters,soweonlyneedtointroducethecorrespondingstarterconfigurationitemsintotheprojecttoeasilyusethecorrespondingfunctions.Variousmetricsareprovided.SpringBootprovidesavarietyofmetricpropertiesthatallowustoviewthecurrentproject'soperationandsystemusage.SpringBootprovidesalotoffeatures,butitlistsjustafewofitsmanyfeatures.SpringBootisveryconvenient,simple,andused.ThisisthebiggestmisunderstandingthatdevelopershavebroughttothebestofSpringBoot'sownfeatures.ForSpringBoot,it'sclearthatit'sthefirststrategythatwrapsthecomplexityandexposessimpleinterfacestotheconsumer,allowingdeveloperstogetstartedquickly.Butobviously,thesystemwedevelopedcan'tbesosimple.Itneedstousemanyothertechnologiesmoreorless.WhenthesetechnologiesareintegratedintoSpringBoot,manyproblemsbegintobeexposed.Ifyoudon'thaveasolidfoundation,youwillfallintothedilemmaofsearchingforresultswhenyouencounteraproblem.Asaresult,youwillbetiredofsearchingforanswersoneday.Afterawhile,youmayaskyourself:IsthisSpringBootIwant?HowdoyoufeelthatitisnotasfastasusingtraditionalSpringMVC?Whenweusethetraditionaldevelopmentmodel,mostofthecontentissetbyourselves;inthiscase,afterthesystemhasaproblem,wecanlocatetheproblemrelativelyquickly;however,inSpringBoot,becauseEverythingisautomaticallyassembled,sopositioningproblemsisaverytimeconsumingandlaborintensiveproblem.SpringBootissimpleandsuperior.IbelievethatthisisalsoaconclusionthatmanydevelopersgetwhenusingSpringBoot.However,IthinktheproblemisthatYAMLisreallymorepowerfulthanproperties(ofcourse,SpringBootsupportsbothmethods).Ifyouhavealotofconfigurationitemsandputtheminapplication.yml(inparticular,putalltheprofileconfigurationshere),thenyoucanlookatyourymlfile,youwillha

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论