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 1 year has passed since last update.

Springの基礎知識

Posted at

Spring Framework

概要
・springプロジェクトが提供する様々なライブラリやフレームワークを手っ取り早く使用ができるオープンソースのフレームワーク
・Java エンタープライズアプリケーションを簡単に作成が出来る

Spring Framework歴史

バージョン リリース年 主なリリース
1.0 2004
2.0 2006 Spring Security、Spring Web Flow
2.5 2007 Spring MVC、Spring Integration、Spring Batch、アノテーションベースDI
3.0 2009 Javaコンフィグ、JPA2.0、Bean Validation
4.0 2013 WebSocket、Webメッセージングのサポート、Java SE8、JavaEE7対応
5.0 2017 WebFlux(リアクティブWeb)、Kotlinサポート
6.0 2022 Java 17およびJakarta EE 9対応

Spring boot

概要
・先に挙げた「Spring Frameworkの機能の使い分けが困難」という欠点を解消するために作られたフレームワーク
・Javaプラットフォーム向けのアプリケーションフレームワークであるSpring FrameworkをWebアプリケーション開発向けに特化させたもの

Spring FrameworkとSpring bootの違いとは
●Spring Framework:Java言語のアプリケーション開発のために作られたフレームワークの集合体
●Spring boot:Spring Frameworkの機能を使いやすくするためのフレームワーク

「Sprig Framework」の全体像
image.png

●Spring Boot
Springアプリケーションを煩雑な設定をせず迅速に作成する機能を提供
●Spring プロジェクト
├・Spring MVC  Webアプリケーションを簡単に作成する機能を提供
├・Spring Data データアクセスに対する機能を提供
├・Spring Batch バッチ処理を提供
└・Spring Security 認証/許可を提供
●Spring コア
├・Spring DI 依存性注入の機能を提供
└・Spirng AOP アスペクト指向プログラミングの機能を提供

Springのプロジェクト作成

作成されたプロジェクトのフォルダの中には「src」フォルダと「pom.xml」というファイルが作成されている

「src」フォルダ
 ├「main」フォルダ-プログラムで使用するファイル類がまとめられている
 └「test」フォルダ-プログラムで使うユニットテストのソースコードがまとめられている
「pom.xml」
<groupId> ――グループID
<artifactId> ――アーティファクトID
<version> ――バージョンを示すテキスト
<packaging> ――パッケージの種類
<name> ――プロジェクト名
<url> ――URL

<properties> ――各種のプロパティが記述される
         プロジェクトのデフォルトエンコーディングを指定するもの
<dependencies> ――この中に<dependency>というタグを使って、必要なライブラリの情報を記述

引用

【WebSocket API】
https://developer.mozilla.org/ja/docs/Web/API/WebSocket/close
https://kanda-it-school-kensyu.com/java-spring-contents/sb_ch02/sb_0203/

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?