簡單了解Spring Web相關模塊運行原理
Spring 的Web層中有4個模塊,分別為spring-web, spring-webmvc, spring-websocket 和 spring-webmvc-portlet。
spring-web
spring-web 提供了核心的Web相關功能的集成,比如IoC容器的初始化、Web應用上下文(context)的初始化、多部(multipart)文件上傳功能、HTTP客戶端、Servlet 過濾器、遠程調用、用于集成其它 web 框架及技術(如Hessian,Burlap)的基礎結構。
spring-webmvc
spring-webmvc 也即 Web-Servlet 模塊,它是 Spring MVC 和 REST 的實現(不過奇怪的是,@RestController、@ResponseBody等注解卻是放在spring-web模塊中的!),并清晰地分離了 domain model 與 web form 的代碼。spring-webmvc 依賴 spring-web,因此引入spring-webmvc 就會間接添加 spring-web,而不必再顯式添加 spring-web。
如果不使用 Spring MVC,只是想使用其它 Spring 支持的 web 相關技術的優勢,那么只需依賴 spring-web 即可。
spri-webmvc-portlet
spring-webmvc-portlet 模塊即 Web-Portlet 模塊,它提供用于portlet環境的 MVC 實現,并具有與 spring-webmvc 模塊相同的功能。
spring-websocket
如其名稱所示,是Spring對websocket的實現。
Spring Framework總覽
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持好吧啦網。
相關文章:
1. Warning: require(): open_basedir restriction in effect,目錄配置open_basedir報錯問題分析2. ASP.NET Core 5.0中的Host.CreateDefaultBuilder執行過程解析3. ASP調用WebService轉化成JSON數據,附json.min.asp4. SharePoint Server 2019新特性介紹5. ASP中常用的22個FSO文件操作函數整理6. React+umi+typeScript創建項目的過程7. php網絡安全中命令執行漏洞的產生及本質探究8. 無線標記語言(WML)基礎之WMLScript 基礎第1/2頁9. 三個不常見的 HTML5 實用新特性簡介10. php測試程序運行速度和頁面執行速度的代碼
