#author("2018-07-01T04:11:43+00:00","default:haikikyou","haikikyou")
[[Spring]]

#contents

Inversion of Control (IoC) 原則の実装である''依存オブジェクト注入''について以下整理する。

* 動作確認のための準備 [#fef6b9ad]

SpringのIoCコンテナのベースは、&code(){org.springframework.beans};と&code(){org.springframework.context};パッケージから構成されている。動作確認しながら仕組みを理解するために、Eclipse等のIDEでMavenプロジェクトを作成し、以下の設定をpon.xmlに追加しておくと良い。


#geshi(xml){{{
<dependencies>
	<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
	<dependency>
		<groupId>org.springframework</groupId>
		<artifactId>spring-core</artifactId>
		<version>5.0.7.RELEASE</version>
	</dependency>
	<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
	<dependency>
		<groupId>org.springframework</groupId>
		<artifactId>spring-context</artifactId>
		<version>5.0.7.RELEASE</version>
	</dependency>
</dependencies>
}}}

&label(warn){参考}; https://mvnrepository.com/artifact/org.springframework

* Dependency Injection [#n2d57aac]

トップ   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
目次
ダブルクリックで閉じるTOP | 閉じる
GO TO TOP