IntelliJ IDEA Tomcat configuration details

Reprinted from: IntelliJ IDEA Tomcat configuration details

1> Enter Edit Configurations

 

2> Click + , select Tomcat server, if it is local Tomcat, select Local

 

3> Tomcat Server -> Unnamed -> Server -> Application server Configuration, find the local Tomcat server, and then click the OK button

 

 

4> 

As shown in 1, we can switch between different containers for the project at any time

 

2, we can assign VM parameters to the running container

 

3, which are the triggered events under the two commands, respectively. This is unique to IntelliJ IDEA and is also the key point

On Update action When we press Ctrl + F10 to update the container, we can update the container according to the content of the event we configured. Among them, the Update classes and resources event I chose is the most commonly used, which means that when we press Ctrl + F10 to update the container, we trigger the update of the compiled classes and resource files to the container. In Debug mode, this is also called HotSwap. This kind of hot deployment is not as easy to use as the JRebel plugin

On frame deactivation When we switch IntelliJ IDEA to the browser, the specified event is updated. This is generally because during web development, we need to frequently switch tests back and forth between IntelliJ IDEA and each browser, so there is such a need. . IntelliJ IDEA is designed to help us do some specific things when doing such boring switching. Of course, if the switching is too frequent, this function is still very resource-intensive, so I set Do nothing to do nothing when switching.

 

As shown in 4, the default HTTP port of Tomcat is 8080, if you need to change its port, you can set it here

 

5, this knowledge point has been discussed in the previous article. Here is what to do before the Tomcat container runs, here are: Make and Build Artifacts operations. As shown in the Gif above, the Build Artifacts here appear automatically after we add Artifacts in the Deployment tab

 

5> Enter the deployment interface again

 

6> Click + in Deployment to select the project to be deployed

 

7> Fill in the access path and click OK

 

8> You can see the deployed project in Application Servers in the main interface, click Run/Connect to run the Tomcat server

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326940755&siteId=291194637