Spring Boot 2.0娣卞害瀹炶返涔嬫牳蹇冩妧鏈瘒
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Spring Boot 2.0娣卞害瀹炶返涔嬫牳蹇冩妧鏈瘒相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/%e4%b8%8a%e4%b8%8b%e6%96%87' title='涓婁笅鏂?>涓婁笅鏂?/a> ros 闃舵 妗嗘灦 娣卞害 鍑芥暟 cti 鐞嗚 鐧惧害缃戠洏
绗?绔?绯诲垪鎬昏
鎬昏 Spring Boot 2.0 娣卞害瀹炶返绯诲垪璇剧▼鐨勬暣浣撹绋嬶紝鍖呮嫭 Spring Boot 涓夊ぇ鏍稿績鐗规€э紙缁勪欢鑷姩瑁呴厤銆佸祵鍏ュ紡Web瀹?銆佺敓浜у噯澶囩壒鎬э級銆乄eb 搴旂敤锛堜紶缁?Servlet銆丼pring Web MVC銆丼pring WebFlux锛夈€佹暟鎹浉鍏筹紙JDBC銆丣PA銆佷簨鍔★級銆佸姛鑳芥墿灞曪紙SpringApplication銆丼pring Boot 閰嶇疆銆丼pring Boot Starter锛変互鍙?..
绗?绔?璧板悜鑷姩瑁呴厤
瀹屾暣鍦拌杩颁簡 Spring Boot 鏄浣曚粠 Spring Framework 閫愭笎璧板悜缁勪欢鑷姩瑁呴厤鐨勩€傛牴鎹?Spring Framework鍙戝睍鐨勮剦缁滐紝棣栧厛浠嬬粛 鈥淪pring 妯″紡娉ㄨВ瑁呴厤鈥濓紝闅忓悗璁茶В 鈥淪pring @Enable 妯″潡瑁呴厤鈥濓紝鏈€鍚庤璁?鈥淪pring 鏉′欢瑁呴厤鈥滐紝鎺屾彙 Spring Framework 涓墍鎻愪緵鐨勫師鐢熻兘鍔涳紝骞朵笖鐞嗚В Spring Boot 鏄浣?..
绗?绔?鐞嗚В SpringApplication
鏈妭棣栧厛绠€浠?SpringApplication 鍩烘湰浣跨敤鏂规硶锛屽苟涓旀牴鎹叾鍦?Spring Boot 搴旂敤鎵€澶勭殑鎵ц闃舵锛屽垎鍒璁?SpringApplication 鍑嗗闃舵浠ュ強 SpringApplication 杩愯闃舵銆傜悊瑙?Spring Boot Bean 閰嶇疆婧愮殑浣滅敤銆乄eb 搴旂敤绫诲瀷鎺ㄦ柇瀵?Spring 搴旂敤涓婁笅鏂囩被鍨嬬殑浣滅敤锛屼互鍙?Spring Boot 浜嬩欢/浜嬩欢鏈哄埗銆?..
绗?绔?Web MVC 鏍稿績
閫氳繃 J2EE 鍓嶇鎺у埗?(Front Controller)妯″紡鐨勪粙缁嶏紝鐞嗚В Spring Web MVC 鏋舵瀯璁捐鐨勬€濇兂锛岄殢鍚庡洖椤維pring Web MVC 鍦ㄤ紶缁?Servlet 瀹?涓?XML 鏂囦欢閰嶇疆鍜?WAR 鏂囦欢閮ㄧ讲鍦烘櫙锛屼互渚块噸鏂拌璇?Spring Web MVC鏍稿績缁勪欢浠ュ強瀹冧滑鐨勪氦浜掓祦绋嬶紝鍖呮嫭 Web MVC 娉ㄨВ椹卞姩鑳藉姏浠ュ強鑷姩瑁呴厤鐨勮兘鍔涳紝浠庤€屾洿濂藉湴鐞嗚В...
绗?绔?Web MVC 瑙嗗浘搴旂敤
鏈珷鏈€涓烘牳蹇冪殑璁涓衡€滆鍥惧唴瀹瑰崗鍟嗏€濓紝鎺屾彙鍐呭鍗忓晢绛栫暐鐨勯厤缃墜娈碉紝鐞嗚В瀹冧滑涓庤鍥惧鐞?鐨勫唴鍦ㄨ仈绯伙紝浠庤€屾繁鍏ョ悊瑙pring Web MVC 瑙嗗浘澶勭悊鐨勬牳蹇冨師鐞嗭紝鐢辨鐞嗚В Spring Boot 鏄浣曡嚜鍔ㄨ閰嶈鍥惧鐞?鍜屽唴瀹瑰崗鍟嗙鐞?锛屼互鍙婃€庝箞閫氳繃澶栭儴鍖栭厤缃帶鍒跺畠浠殑琛屼负銆傚悓鏃朵粙缁嶆柊涓€浠f湇鍔$妯℃澘寮曟搸 Thymeleaf锛屽唴瀹瑰寘...
绗?绔?Web MVC REST 搴旂敤
棣栧厛璁ㄨ REST 鍩烘湰鐞嗚锛屽苟浠嬬粛 Spring Web MVC 瀵?REST 鍏ㄩ潰鏀寔锛屽寘鎷?REST 鎺у埗瀹氫箟銆佹敞瑙f槧灏勩€佽姹傘€佸搷搴斻€丄OP 鎷︽埅浠ュ強璺ㄥ煙鎺у埗锛堝锛欯CrossOrigin锛夌瓑銆傞殢鍚庨噸鐐硅璁哄苟缁撳悎婧愮爜鍒嗘瀽 REST 鍐呭鍗忓晢鐨勫師鐞嗭紝鐞嗚В鍐呭鍗忓晢绠$悊.浠ュ強浜嗚В Spring Web MVC REST 鍐呭鍗忓晢澶勭悊娴佺▼銆?..
绗?绔?娓愯娓愯繙鐨?Servlet
璁ㄨ鐨勮棰樹富瑕佸洿缁曠潃 Spring Boot 2.0 鎬庝箞璁?Servlet 娓愯娓愯繙锛岄鍏堥渶瑕佷簡瑙g殑鏄?Servlet 鐨勪娇鐢ㄥ満鏅紝浠ュ強鍚勭増鏈?Servlet 瑙勮寖鎵€瑕嗙洊鐨勫姛鑳界壒鎬э紝鍏朵腑鍖呮嫭 Spring Boot 鎵€鏀寔 Servlet 3.1+ 瑙勮寖銆傞€氳繃 Servlet 鐢熷懡鍛ㄦ湡鐨勮璁猴紝鍔犳繁 Spring Web MVC DispatcherServlet 浠ュ強鍏朵粬 Filter 缁勪欢...
绗?绔?浠?Reactive 鍒?WebFlux
甯姪澶у鐞嗚В Reactive 鐨勬湰璐ㄣ€傞€氳繃 Reactive 鍏涓嶅悓瀹氫箟銆佺紪绋嬫ā鍨嬨€佷互鍙婅璁℃ā寮忥紝鐞嗚В瀹冪殑浣跨敤鍦烘櫙锛屽苟寤朵几浠嬬粛 Reactive Streams 瑙勮寖鍜屽畠鐨勫疄鐜版鏋?Reactor銆傚湪鐞嗚鍜屽疄璺电殑缁撳悎涓嬶紝浣挎垜浠竻閱掑湴璁よ瘑鍒?Reactive 骞堕潪鏂伴矞浜嬬墿锛岃€屾槸涓€绉嶆柊鍨嬬殑缂栫▼妯″瀷锛屽畠鍗充笉灞€闄愪簬鍏跺疄鐜版鏋讹紝涔熷苟闈炶В鍐抽棶棰樼殑鈥滈摱寮?..
绗?绔?WebFlux 鏍稿績
缁х画璁ㄨ WebFlux 鐨勪娇鐢ㄥ満鏅€佺紪绋嬫ā鍨嬩互鍙婃牳蹇冩帴鍙c€傚叾涓紝浣跨敤鍦烘櫙閮ㄥ垎灏嗕粙缁?Spring WebFlux 鐨勫紩鍏ュ姩鏈猴紝瀵规瘮 Spring MVC 鐨勯€傜敤鎬ц竟鐣屻€佹墽琛屾€ц兘浠ュ強骞跺彂妯″瀷銆傝璁虹殑鐒︾偣闆嗕腑鍦ㄧ紪绋嬫ā鍨嬶紝Spring WebFlux 鎻愪緵鍑芥暟寮?Endpoint鐨勬敮鎸侊紝杩涜€屾彁鍗囪姹傚鐞嗗拰鏄犲皠鐨勭紪绋嬪脊鎬с€傛渶鍚庯紝閫氳繃瀵规瘮 Spring MVC 鏍?..
绗?0绔?瓒呰秺澶栭儴鍖栭厤缃?br>棣栧厛璁ㄨ鐨勮棰樹负 Spring Environment 鎶借薄锛屽畠浣滀负 Spring Framework 浠ュ強 Spring Boot锛岀敋鑷虫槸Spring Cloud 鐨勯厤缃牳蹇?API銆傜粨鍚圫pringApplication 鐢熷懡鍛ㄦ湡鍜?Spring Boot 浜嬩欢鍒嗘瀽锛屽畯瑙傚湴鎶婃彙 Spring Boot 澶氱閰嶇疆婧愮殑浣跨敤鍦烘櫙锛岀悊瑙e畠浠箣闂翠紭鍏堢骇椤哄簭閫昏緫锛岃繘鑰屼负鎵╁睍 Spring Boot 澶栭儴鍖栭厤...
涓嬭浇鍦板潃:鐧惧害缃戠洏涓嬭浇
以上是关于Spring Boot 2.0娣卞害瀹炶返涔嬫牳蹇冩妧鏈瘒的主要内容,如果未能解决你的问题,请参考以下文章