1. 程式人生 > >1.Spring Framework 入門篇

1.Spring Framework 入門篇

模塊化設計 ima 幫助 jar包 p s bstr pin int support

0x00為什麽學習Spring

隨著對Java EE的不斷接觸和理解,你會發現Spring MVC 在各個企業和項目中發揮著越來越重要的作用。掌握Spring MVC 已成為我們IT行業生存必學的本領之一。

Spring Framework 是一個開源的Java/Java EE全功能棧(full-stack)的應用程序框架,以Apache許可證形式發布,也有.NET平臺上的移植版本。該框架基於 Expert One-on-One Java EE Design and Development(ISBN 0-7645-4385-7)一書中的代碼,最初由Rod Johnson和Juergen Hoeller等開發。Spring Framework提供了一個簡易的開發方式,這種開發方式,將避免那些可能致使底層代碼變得繁雜混亂的大量的屬性文件和幫助類。

0x01 Spring 官網介紹

Spring 官網:https://spring.io/

Spring 文檔:https://spring.io/guides

Spring IDE: https://spring.io/tools/sts

Spring Project: https://spring.io/projects

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

從配置到安全,Web應用程序到大數據-無論你的應用程序的基礎設施需求可能是,有一個Spring項目,以幫助您建立它。啟動小,使用你所需要的-Spring是模塊化設計.

Spring Project 有很多, 而我們這裏將要重點學習和掌握的是Spring Framework。

技術分享圖片

0x02 Spring Framework

Spring Framework介紹

Spring Framework核心支持依賴註入,事務管理,Web應用程序,數據訪問,消息傳遞,測試和更多。

Spring Framework提供了現代的基於java的企業應用程序在任何部署平臺的綜合規劃和配置模型。Spring的一個關鍵要素是應用層的基礎設施支持:Spring專註於企業應用程序的“管道”,這樣團隊就可以專註於應用程序級業務邏輯,而不必對特定部署環境進行不必要的聯系。

Spring Framework 功能特點

依賴註入 面向方面編程包括Spring的聲明事務管理 Spring MVC Web應用程序和REST Web服務框架 基本支持JPA,JDBC,JMS 更多…

技術分享圖片

Minimum requirements

  • JDK 6+ for Spring Framework 4.x
  • JDK 5+ for Spring Framework 3.x

核心Jar包依賴關系:

如果你不是寫一個java web Application,那麽將不需要spring-web 模塊。

GroupId

ArtifactId

Description

org.springframework

spring-aop

Proxy-based AOP support

org.springframework

spring-aspects

AspectJ based aspects

org.springframework

spring-beans

Beans support, including Groovy

org.springframework

spring-context

Application context runtime, including scheduling and remoting abstractions

org.springframework

spring-context-support

Support classes for integrating common third-party libraries into a Spring application context

org.springframework

spring-core

Core utilities, used by many other Spring modules

org.springframework

spring-expression

Spring Expression Language (SpEL)

org.springframework

spring-instrument

Instrumentation agent for JVM bootstrapping

org.springframework

spring-instrument-tomcat

Instrumentation agent for Tomcat

org.springframework

spring-jdbc

JDBC support package, including DataSource setup and JDBC access support

org.springframework

spring-jms

JMS support package, including helper classes to send/receive JMS messages

org.springframework

spring-messaging

Support for messaging architectures and protocols

org.springframework

spring-orm

Object/Relational Mapping, including JPA and Hibernate support

org.springframework

spring-oxm

Object/XML Mapping

org.springframework

spring-test

Support for unit testing and integration testing Spring components

org.springframework

spring-tx

Transaction infrastructure, including DAO support and JCA integration

org.springframework

spring-web

Foundational web support, including web client and web-based remoting

org.springframework

spring-webmvc

HTTP-based Model-View-Controller and REST endpoints for Servlet stacks

org.springframework

spring-webmvc-portlet

MVC implementation to be used in a Portlet environment

org.springframework

spring-websocket

WebSocket and SockJS infrastructure, including STOMP messaging support

1.Spring Framework 入門篇