How to create (war package mode) maven project in idea and deploy to Tomcat service

Step 1: Right-click on the parent project.
Insert picture description here
Insert picture description here
Step 2: The directory file as shown in the figure appears.
Insert picture description here
Right-click (shown in the figure).
Insert picture description here
Step 3: Configure module—>web.
Insert picture description here
If there is no web: click the + sign to select
Insert picture description here
Step 4:
Insert picture description here
If an error occurs during Tomcat configuration , click-to delete
Insert picture description here
Step 5: Configure Artifacts
Insert picture description here
Step 6: Add
Insert picture description here
Insert picture description here
Insert picture description here
Step 7: As shown in the figure (that is, the configuration is successful)
Insert picture description here
Step 8: Configure Tomcat server
Insert picture description here
Insert picture description here
If the option does not have Tomcat, click More

Insert picture description here
Click the previously configured test: war exploded
Insert picture description here
as shown in the figure, the
Insert picture description here
test starts
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_44763595/article/details/112738557