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.

SpringBoot最速体験

Last updated at Posted at 2019-12-09

所要時間 初心者15分。ベテラン5分。

目的

SpringBoot と Gradle で最速で Hello World! する。

手順概要

1.プロジェクトのひな形を作る

Spring Initializr を使って、Gradle のひな形をダウンロードする。
※ちなみに Maven のひな形もダウンロードできる。

2.IDE(IntelliJ) でプロジェクトのひな形を開く

ひな形フォルダを開けばOK。

3.文字列「Hello World!」を返すRestAPIを実装する

下記2つのアノテーションを設定し、文字列を返すメソッドを作ればOK。
@RequestController
@RequestMapping

4.起動(Gradleビルド)する

Gradleのタスク「bootRun」を実行する。
http://localhost:8080 にアクセスする。

手順詳細

所感

これは簡単!
目的がスピード重視過ぎるため、実践レベルではspringのその他諸々の機能を扱えるようになる必要はあるが、Webアプリケーションが起動する状態に持って行くまで5分、慣れればそれ以下というのは侮れないと思う。

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?