0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Springフレームワーク全体構成

Posted at

image.png
フレームワーク ArtifactId 概要
Spring Core spring-core Springフレームワーク全般で必要となる中心機能。
Spring Beans spring-beans プログラムで必要となるコンポーネントをBeanとしてインスタンス化して利用するための機能。
Spring Context spring-context
spring-context-support アプリケーションのコンテキストを扱うための機能。
DIコンテナに必要なApplicationContextなどコンテキスト利用のためのクラス類がまとめられている。
Spring Expression Language
spring-expression Springの設定を行うXMLなどで、JSPのEL式のような機能を提供する。
Spring AOP spring-aop AOP(Aspect Oriented Programming)のインタフェースを提供する。
機能としてはメソッドのインターセプト定義をし、共通処理を組み込むなど。
これらはAspectJ(Xerox社オープンソースライブラリ)の機能を核にして作成されており、実質的な実装はこれとなる。
Spring JDBC spring-jdbc 標準JavaAPIであるJDBC(Java Database Connectivity)の機能を提供する。
Spring Object/Relational Mapping spring-orm Hibernate、iBatisといったORM(Object Relational Mapping)のための統合層を提供する。
Spring Transaction spring-tx トランザクション管理機能を提供する。
Spring 各ORMのトランザクションを統一的に扱う方法が用意されている。
Spring Web spring-web Webアプリケーションのための機能を提供する。
(HTTP通信、マルチパートファイルなど)
Spring Web MVC
spring-webmvc SpringMVCに関する機能を提供する。
DispatcherServletがコアとなり、各機能の呼び出しを全て行う。

2.DIコンテナ概要
Springフレームワークのコア機能であるDIは「Dependency Injection」の略で「依存性注入」を実現する機能となる。

IoC(Inversion of Control)とも呼ばれる。

主な目的はコンポーネント(作成したプログラム部品)から特定のデータや設定を排除し、プログラム間疎結合の実現などにある。

これら詳細の概念やメリットについては、各種記事や文献を参考いただきたい。

基本となるDIコンテナの簡単な処理イメージを以下に示す。

DIコンテナ機能により、コンポーネントから依存性を排除する以外に、インスタンスの管理(newの箇所)もフレームワーク側へ移譲することができる。
1q.PNG

3.SpringMVC概要
SpringMVCの全体構成(構成、階層、処理フロー)を以下に示す。

※TERASOLUNA開発ガイドの図を転載(*1)
2q.PNG

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?