When using Idea, after modifying the code, you need to restart Tomcat repeatedly to check the effect. Isn’t it annoying? I still remember when I first started using idea, I blindly configured and deployed Tomcat. As a result, I had to restart the server every time I modified a jsp. How could a Taurus programmer like me tolerate this? ~At this time you have to smash your computer~At this time you can add hot deployment to the project, which will greatly save development efficiency! @ Tomcat Download TutorialIn fact, downloading is very simple. As for why I added the word "tutorial" ~ because it sounds good and easy to pronounce ~ Official website address - click to enter http://tomcat.apache.org/ Tomcat installation tutorialJust unzip it and the installation is over. However, the unzip path should not be the C drive, as it may cause various strange problems such as access denied. Also, the unzip path should not contain Chinese characters or special characters, remember! ! ! Hot deployment of Tomcat to IDEAThe default file of IntelliJ Idea is saved automatically. However, when a jsp file of a project is changed, Tomcat cannot respond to the change immediately, so hot deployment is required. Look here: If you find it annoying, you can ignore the long string of text below ~ I am just Photoshopping ~, it is completely OK to just follow the pictures! ! ! In the server configuration of idea tomcat, there is an on frame deactivation, select update classes and resources. There is also a configuration on update action, which is what action to take when manually operating. You can restart the server or update the class and resource files as above. I chose Redeploy. However, the current project does not have the option to update classes and resources, but there is a Hot Swap classes. This is due to the type of artifact added by the server. Generally, a module corresponds to two types of artifacts, one is war and the other is war explored. war means it is released in the form of a war package. The current project is in this form. In this form, the on frame deactivation configuration does not have the update classes and resources option. war explored is the published file directory. If you select this form, the update classes and resources option will appear in on frame deactivation. The specific operations are as follows: At this point, Tomcat hot deployment is on the idea, over~ Idea two hot deployment setting methodsThe second method: add corresponding dependencies in pom.xml (not recommended). As for why it is not recommended, it is because there is not so much spare time in later development to pay attention to whether hot deployment coordinate dependencies are introduced. It is better to configure it directly on idea. As the saying goes, one effort brings one hundred benefits! ! ! The specific operation is similar to the following <!--Support hot deployment dependencies--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency> At this point, two methods have been explained. Hey, isn’t this just one method? I’ll give you a thumbs up... Brother, don’t be impulsive and don’t rush to give me a thumbs up. The first method is the setting that comes with idea, which has been configured above! Waving my claws, goodbye~ The classmate who wants to butt my fei, don't leave after school~... Summarize The above is the tutorial on how to download, install and deploy Tomcat to IDEA (with two hot deployment setting methods of IDEA). I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: The linkage method between menu and tab of vue+iview
>>: MySQL replication mechanism principle explanation
The functions of the three attributes flex-grow, ...
concept MMM (Master-Master replication manager fo...
RedHat6.5 installation MySQL5.7 tutorial sharing,...
Node.js solves the problem of Chinese garbled cha...
React multiple ways to get the value of the input...
This article example shares the specific code for...
Table of contents Common payment methods in proje...
Table of contents Preface What to use if not jQue...
Table of contents Why optimize? ? Where to start?...
Use nginx to configure the separation of PC site ...
bgcolor="text color" background="ba...
1. Best left prefix principle - If multiple colum...
When using MySQL database, you often encounter su...
introduce In a distributed system, distributed lo...
This article example shares the specific code of ...