天天看點

Spring4讀書筆記(1)-子產品

Srping主要子產品

Spring4讀書筆記(1)-子產品

Core Container

  • spring-core,

    spring-beans: 提供基礎功能,包括IoC和DI等特性。對依賴起到解耦作用(BeanFactory)。

  • spring-context: 上下文子產品,基于core和beans建構,context實作以類似JNDI系統資料庫的方式通路beans(framework-style manner,通過對象id通路context中的對象)。此外,context增加了對國際化、事件傳播、資源加載、JavaEE(EJB,JMX,RMI

    )以及讓容器透明地建立context等功能的支援。ApplicationContext是此子產品的重點。

  • spring-context-support:為第三方包的內建提供支援,例如:caching (EhCache, Guava, JCache), mailing (JavaMail), scheduling (CommonJ, Quartz) and template engines (FreeMarker, JasperReports, Velocity)。

  • spring-expression:提供SPEL支援,可以在運作時根據表帶是進行查詢和操作對象。

AOP and Instrumentation

  • spring-aop:提供AOP支援
  • spring-aspects: 支援AspectJ的內建
  • spring-instrument,spring-instrument-tomcat: 對特定應用伺服器的代理接口 

Messaging

  • spring-messaging:為基于消息的應用提供服務,包含消息的抽象(

    Message

    MessageChannel

    ,

    MessageHandler

    )以及相關注解

Data Access/Integration

  • spring-jdbc:提供JDBC抽象層,實作了繁雜的JDBC編碼和資料庫廠商錯誤代碼的轉換工作
  • spring-tx:對程式設計式和聲明式事務管理的支援
  • spring-orm :提供對ORM(JPA, JDO, Hibernate)的支援
  • spring-oxm:對Object/XML映射的內建支援,例如:JAXB, Castor, XMLBeans, JiBX and XStream
  • spring-jms:JMS服務,包含了對消息的生産和消費相關功能,可以內建spring-messaging

Web

  • spring-web:提供基本的面向web應用的特性,例如檔案上傳、面向web的Ioc容器和context、HTTP client、web相關的遠端調用
  • spring-webmvc:包含了用于web應用的spring的MVC和REST Web Service實作
  • spring-websocket:WebSocket和SockJS的實作,包含了對STOMP的支援
  • spring-webmvc-portlet:提供用于portlet環境的的MVC實作

Test

  • spring-test:支援對spring元件的單元測試和內建測試,可以使用JUNIT和TestNG作為測試元件