全民快乐8

你当前所在位置:全民快乐8 > IT就业问题 > Java面试题及答案(11/19)——Spring Boot / Spring Cloud

Java面试题及答案(11/19)——Spring Boot / Spring Cloud

104. 什么是 spring boot?

 

ZAISpringKUANGJIAZHEIGEDAJIAZUZHONG,CHANSHENGLEHENDUOYANSHENGKUANGJIA,BIRU Spring、SpringMvcKUANGJIADENG,SpringDEHEXINNEIRONGZAIYUKONGZHIFANZHUAN(IOC)HEYILAIZHURU(DI),SUOWEIKONGZHIFANZHUANBINGFEISHIYIZHONGJISHU,ERSHIYIZHONGSIXIANG,ZAICAOZUOFANGMIANSHIZHIZAIspringPEIZHIWENJIANZHONGCHUANGJIAN,YILAIZHURUJIWEIYOUspringRONGQIWEIYINGYONGCHENGXUDEMOUGEDUIXIANGTIGONGZIYUAN,BIRU YINYONGDUIXIANG、CHANGLIANGSHUJUDENG。

 

全民快乐8SpringBootSHIYIGEKUANGJIA,YIZHONGQUANXINDEBIANCHENGGUIFAN,TADECHANSHENGJIANHUALEKUANGJIADESHIYONG,SUOWEIJIANHUASHIZHIJIANHUALESpringZHONGDUOKUANGJIAZHONGSUOXUDEDALIANGQIEFANSUODEPEIZHIWENJIAN,SUOYI SpringBootSHIYIGEFUWUYUKUANGJIADEKUANGJIA,FUWUFANWEISHIJIANHUAPEIZHIWENJIAN。

 

105. 为什么要用 spring boot?

 

Java面试题- spring boot

 

106. spring boot 核心配置文件是什么?

 

全民快乐8Spring BootTIGONGLELIANGZHONGCHANGYONGDEPEIZHIWENJIAN:

 

全民快乐8● propertiesWENJIAN

全民快乐8● ymlWENJIAN

 

107. spring boot 配置文件有哪几种类型?它们有什么区别?

 

全民快乐8Spring BootTIGONGLELIANGZHONGCHANGYONGDEPEIZHIWENJIAN,FENBIESHIpropertiesWENJIANHEymlWENJIAN。XIANGDUIYUpropertiesWENJIANERYAN,ymlWENJIANGENGNIANQING,YEYOUHENDUODEKENG。KEWEICHENGYEXIAOHEBAIXIAOHE,ymlTONGGUOKONGGELAIQUEDINGCENGJIGUANXI,SHIPEIZHIWENJIANJIEGOUGENQINGXI,DANYEHUIYINWEIWEIBUZUDAODEKONGGEERPOHUAILECENGJIGUANXI。

 

108. spring boot 有哪些方式可以实现热部署?

 

SpringBootREBUSHUSHIXIANYOULIANGZHONGFANGSHI:

 

全民快乐8①. SHIYONGspring loaded

 

ZAIXIANGMUZHONGTIANJIARUXIADAIMA:

 

Java面试题- spring boot

 

TIANJIAWANBIHOUXUYAOSHIYONGmvnZHILINGYUNXING:

 

SHOUXIANZHAODAOIDEAZHONGDEEdit configurations ,RANHOUJINXINGRUXIACAOZUO:(DIANJIZUOSHANGJIAODE"+",RANHOUXUANZEmavenJIANGCHUXIANYOUCEMIANBAN,ZAIHONGSEHUAXIANBUWEISHURURUTUSUOSHIZHILING,NIKEYIWEIGAIZHILINGMINGMING(CICHUMINGMINGWEIMvnSpringBootRun))

 

Java面试题- spring boot

 

DIANJIBAOCUNJIANGHUIZAIIDEAXIANGMUYUNXINGBUWEICHUXIAN,DIANJILVSEJIANTOUYUNXINGJIKE

 

Java面试题- spring boot

 

②. SHIYONGspring-boot-devtools

 

ZAIXIANGMUDEpomWENJIANZHONGTIANJIAYILAI:

 

Java面试题- spring boot

 

RANHOU:SHIYONG shift+ctrl+alt+"/" (IDEAZHONGDEKUAIJIEJIAN) XUANZE"Registry" RANHOUGOUXUAN compiler.automake.allow.when.app.running

 

109. jpa 和 hibernate 有什么区别?

 

全民快乐8● JPA Java Persistence API,SHIJava EE 5DEBIAOZHUNORMJIEKOU,YESHIejb3GUIFANDEYIBUFEN。

 

● Hibernate,DANGJINHENLIUXINGDEORMKUANGJIA,SHIJPADEYIGESHIXIAN,DANSHIQIGONGNENGSHIJPADECHAOJI。

 

● JPAHEHibernateZHIJIANDEGUANXI,KEYIJIANDANDELIJIEWEIJPASHIBIAOZHUNJIEKOU,HibernateSHISHIXIAN。NEIMEHibernateSHIRUHESHIXIANYUJPADEZHEIZHONGGUANXIDENI。HibernateZHUYAOSHITONGGUOSANGEZUJIANLAISHIXIANDE,JIhibernate-annotation、hibernate-entitymanagerHEhibernate-core。

 

全民快乐8● ibernate-annotationSHIHibernateZHICHIannotationFANGSHIPEIZHIDEJICHU,TABAOKUOLEBIAOZHUNDEJPA annotationYIJIHibernateZISHENTESHUGONGNENGDEannotation。

 

全民快乐8● hibernate-coreSHIHibernateDEHEXINSHIXIAN,TIGONGLEHibernateSUOYOUDEHEXINGONGNENG。

 

全民快乐8● hibernate-entitymanagerSHIXIANLEBIAOZHUNDEJPA,KEYIBATAKANCHENGhibernate-coreHEJPAZHIJIANDESHIPEIQI,TABINGBUZHIJIETIGONGORMDEGONGNENG,ERSHIDUIhibernate-coreJINXINGFENGZHUANG,SHIDEHibernateFUHEJPADEGUIFAN。

 

110. 什么是 spring cloud?

 

全民快乐8CONGZIMIANLIJIE,Spring Cloud JIUSHIZHILIYUFENBUSHIXITONG、YUNFUWUDEKUANGJIA。

 

全民快乐8Spring Cloud SHIZHENGGE Spring JIAZUZHONGXINDECHENGYUAN,SHIZUIJINYUNFUWUHUOBAODEBIRANCHANWU。

 

Spring Cloud WEIKAIFARENYUANTIGONGLEKUAISUGOUJIANFENBUSHIXITONGZHONGYIXIECHANGJIANMOSHIDEGONGJU,LIRU:

 

Java面试题- spring cloud

 

SHIYONG Spring Cloud KAIFARENYUANKEYIKAIXIANGJIYONGDESHIXIANZHEIXIEMOSHIDEFUWUHEYINGYONGCHENGXU。ZHEIXIEFUWUKEYIRENHEHUANJINGXIAYUNXING,BAOKUOFENBUSHIHUANJING,YEBAOKUOKAIFARENYUANZIJIDEBIJIBENDIANNAOYIJIGEZHONGTUOGUANPINGTAI。

 

111. spring cloud 断路器的作用是什么?

 

ZAISpring CloudZHONGSHIYONGLEHystrix LAISHIXIANDUANLUQIDEGONGNENG,DUANLUQIKEYIFANGZHIYIGEYINGYONGCHENGXUDUOCISHITUZHIXINGYIGECAOZUO,JIHENKENENGSHIBAI,YUNXUTAJIXUERBUDENGDAIGUZHANGHUIFUHUOZHELANGFEI CPU ZHOUQI,ERTAQUEDINGGAIGUZHANGSHICHIJIUDE。DUANLUQIMOSHIYESHIYINGYONGCHENGXUNENGGOUJIANCEGUZHANGSHIFOUYIJINGJIEJUE,RUGUOWENTISIHUYIJINGDEDAOJIUZHENG,YINGYONGCHENGXUKEYICHANGSHIDIAOYONGCAOZUO。

 

全民快乐8DUANLUQIZENGJIALEWENDINGXINGHELINGHUOXING,YIYIGEXITONG,TIGONGWENDINGXING,ERXITONGCONGGUZHANGZHONGHUIFU,BINGJINLIANGJIANSHAOCIGUZHANGDEDUIXINGNENGDEYINGXIANG。TAKEYIBANGZHUKUAISUDIJUJUEDUIYIGECAOZUO,JIHENKENENGSHIBAI,ERBUSHIDENGDAICAOZUOCHAOSHI(HUOZHEBUFANHUI)DEQINGQIU,YIBAOCHIXITONGDEXIANGYINGSHIJIAN。RUGUODUANLUQITIGAOMEICIGAIBIANZHUANGTAIDESHIJIANDESHIJIAN,GAIXINXIKEYIBEIYONGLAIJIANCEYOUDUANLUQIBAOHUXITONGDEBUJIANDEJIANKANGZHUANGKUANG,HUOYITIXINGGUANLIYUANDANGDUANLUQITIAOZHA,YIZAIDAKAIZHUANGTAI。

 

112. spring cloud 的核心组件有哪些?

 

①. FUWUFAXIAN——Netflix Eureka

 

YIGERESTfulFUWU,YONGLAIDINGWEIYUNXINGZAIAWSDIQU(Region)ZHONGDEZHONGJIANCENGFUWU。YOULIANGGEZUJIANZUCHENG:EurekaFUWUQIHEEurekaKEHUDUAN。EurekaFUWUQIYONGZUOFUWUZHUCEFUWUQI。EurekaKEHUDUANSHIYIGEjavaKEHUDUAN,YONGLAIJIANHUAYUFUWUQIDEJIAOHU、ZUOWEILUNXUNFUZAIJUNHENGQI,BINGTIGONGFUWUDEGUZHANGQIEHUANZHICHI。NetflixZAIQISHENGCHANHUANJINGZHONGSHIYONGDESHILINGWAIDEKEHUDUAN,TATIGONGJIYULIULIANG、ZIYUANLIYONGLVYIJICHUCUOZHUANGTAIDEJIAQUANFUZAIJUNHENG。

 

②. KEFUDUANFUZAIJUNHENG——Netflix Ribbon

 

Ribbon,ZHUYAOTIGONGKEHUCEDERUANJIANFUZAIJUNHENGSUANFA。RibbonKEHUDUANZUJIANTIGONGYIXILIEWANSHANDEPEIZHIXUANXIANG,BIRULIANJIECHAOSHI、ZHONGSHI、ZHONGSHISUANFADENG。RibbonNEIZHIKECHABA、KEDINGZHIDEFUZAIJUNHENGZUJIAN。

 

③. DUANLUQI——Netflix Hystrix

 

全民快乐8DUANLUQIKEYIFANGZHIYIGEYINGYONGCHENGXUDUOCISHITUZHIXINGYIGECAOZUO,JIHENKENENGSHIBAI,YUNXUTAJIXUERBUDENGDAIGUZHANGHUIFUHUOZHELANGFEI CPU ZHOUQI,ERTAQUEDINGGAIGUZHANGSHICHIJIUDE。DUANLUQIMOSHIYESHIYINGYONGCHENGXUNENGGOUJIANCEGUZHANGSHIFOUYIJINGJIEJUE。RUGUOWENTISIHUYIJINGDEDAOJIUZHENG,YINGYONGCHENGXUKEYICHANGSHIDIAOYONGCAOZUO。

 

④. FUWUWANGGUAN——Netflix Zuul

 

LEISInginx,FANXIANGDAILIDEGONGNENG,BUGUOnetflixZIJIZENGJIALEYIXIEPEIHEQITAZUJIANDETEXING。

 

⑤. FENBUSHIPEIZHI——Spring Cloud Config

 

全民快乐8ZHEIGEHAISHIJINGTAIDE,DEPEIHESpring Cloud BusSHIXIANDONGTAIDEPEIZHIGENGXIN。

课程预约

全民快乐8

全民快乐8

全民快乐8