IntelliJ IDEA + tomcat set up hot deployment

1. Click tomcat settings in idea

                        

 

 

2. Click deployment to see whether the package that tomcat runs each time in Deploy at the server startup is xxxx:war or something else, if it is the xxxx:war package, please replace it

 

 

 

3. Click the green plus sign next to it, select xxxx:war exploded, and then click the red to delete xxxx:war 

 

 

 

4. Then select "On Update action" and "On frame deactivation" in the server to update classes and resources

 

 

5. You're done, to test it yourself, you don't need to restart every time you modify the code! Further abandon eclipse! (After modifying the code several times, remember to restart the project once, in case it is not accurate enough!)

 

 

6. Remember!!!!! Be sure to start in Debug mode!

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326502504&siteId=291194637