LoginSignup
13
15

More than 3 years have passed since last update.

Spring InitializrをIntelliJで使う

Last updated at Posted at 2015-11-28

はじめに

SPRING INITIALIZRを使うと簡単にSpring Bootベースのアプリケーションが作成できる。

image

これをIntelliJから利用できるプラグインが追加になったので試してみる。

環境

  • Mac
  • IntelliJ 15

手順

IntelliJのメニューから「File」「New」「Project」を選択

image

左のペインから「Spring Initializr」を選択して「Next」

image

TypeをGradle Projectを選択して「Next」ボタンをクリック

image

※Packagingで「War」が選択できるがこれは選択しないほうがいいらしい
※Typeは、Maven Projectでもいい

とりあえず「Web」と「Actuator」を選択して「Next」ボタンをクリック

検索窓を使って検索すると少し選びやすい
image

Project Nameを適当に入力して、「Finish」ボタンをクリック

image

Gradleの設定画面がでるかもしれない。気にならなければそのまま「OK」

image

できた「DemoApplication」を実行

image

8080ポートで立ち上がる

image

Actuatorの情報をみる

statusがupになっていればOK

~/D/g/spring-cloud-stream ❯❯❯ curl http://localhost:8080/health                                                                                                                         [master]
{"status":"UP","diskSpace":{"status":"UP","total":249804886016,"free":19889369088,"threshold":10485760}}% 
13
15
2

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
13
15