idea配置Tomcat并运行

IntelliJ IDEA – Run / debug web application on Tomcat

这个写得很完善了,直接复制过来了。

1.一般 Tomcat and TomEE插件一般已经装了;

2.deployment里面选war exploded的原因是可以运行时自动更新,便于调试。

What does Exploded Development mean? (In Java)

1. Tomcat Plugin

1.1 File –>> Settings –>> Type Plugin –>> Make sure Tomcat and TomEE Integration is checked.

idea-run-debug-tomcat-example

2. Run/Debug Configuration

2.1 Run –>> Edit Configurations…

idea-run-debug-tomcat-example1

2.2 Clicks + icon, select Tomcat Server –>> Local

idea-run-debug-tomcat-example2

3. Tomcat Configuration

3.1 Clicks on the “Deployment” tab, + icon to select an artifact to deploy. For break point debugging, always choose the exploded war version.

idea-run-debug-tomcat-example4

3.2 Clicks on “Server” tab, select a Tomcat server, and update the on 'Update' action to “Update classes and resources” – for hot swap.

idea-run-debug-tomcat-example5

4. Application Servers

4.1 Now you can see an “Application Servers” view displayed at the bottom panel.

idea-run-debug-tomcat-example6

Start or debug your web application, done.

Last updated

Was this helpful?