IntelliJ IDEA – TomcatでWebアプリケーションを実行/デバッグします
この記事では、IntelliJ IDEAを使用して、TomcatサーバーでWebアプリケーションを実行またはデバッグする方法を示します。
Note
Eclipse IDEとは異なり、追加サーバーを構成するための「サーバービュー」が常にあります。IntelliJは別の方法で処理します。最初に「アーティファクト(warファイル)」を追加してから、下部に「サーバービュー」が表示されます。
1. Tomcatプラグイン
1.1 File –>> Settings –>> Type Plugin –>> Make sure Tomcat and TomEE Integration is checked.
2. Run/Debug Configuration
2.1 Run –>> Edit Configurations…
2.2 Clicks + icon, select Tomcat Server –>> Local
3. Tomcatの構成
3.1 Clicks on the “Deployment” tab, + icon to select an artifact to deploy. ブレークポイントのデバッグでは、常に展開された戦争バージョンを選択します。
3.2 Clicks on “Server” tab, select a Tomcat server, and update the on 'Update' action
to “Update classes and resources” – for hot swap.
4. アプリケーションサーバー
4.1 Now you can see an “Application Servers” view displayed at the bottom panel.
Webアプリケーションを開始またはデバッグします。