LoginSignup
13
18

More than 5 years have passed since last update.

Eclipse4.6 + Spring MVC

Last updated at Posted at 2016-07-15

今のプロジェクトでSpring+Oracleを初めて使うことになったのでSpring MVCプロジェクト作成した時のメモ
(ホントはSpring Bootでやりたがったけど、最後はTomcat上で動かすし、Boot急に起動しなくなったりと意味不明だったので断念)
また、あとでOrace DB接続したときのことも書こうかと。。

Eclipse

まずはEclipse最新版(4.6)のJava+Full Editionをダウンロード

image

Spring Tool Suite

EclipseでSpring開発するためのプラグインをインストール

メニューのヘルプ→Eclipseマーケットプレースで"STS"で検索

image

「Spring Tool Suite(STS) for Eclipse 3.8.0 RELEASE」をインストール
インストール後、Eclipse再起動してSpringパースペクティブを開く。

image

Spring MVCプロジェクト作成

パッケージエクスプローラ上で右クリック→新規→Springレガシー・プロジェクト

image

テンプレートから「Spring MVC Project」を選択してプロジェクト作成

image

どっかのリポジトリからテンプレートをダウンロードしてるみたいなので数秒待つとプロジェクト作成完了~

image

Spring MVCプロジェクト起動

動作させるサーバーが設定されていないので左下の「使用可能なサーバーがありません。・・・」リンクをクリックしてサーバー設定
今回はTomcat8を選択

image

プロジェクトを右クリック→実行→サーバーで実行

image

Hello world!が表示
もちろんブラウザでhttp://localhost:8080/spring/ にアクセスしても表示される

image

13
18
1

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
18