IDEA builds web project environment configuration and automatically deploys to tomcat

当我们使用IDEA写Web小项目的时候,写出来的代码要展示在网页上,一步一步进行功能的添加、修改,但是首先我们要做的就是要配置好Web项目的环境,将其自动部署到网络上,通过网页展示的内容观看是否是自己想要实现的功能,可以进行抓包查看问题。

Steps for environment configuration:

1. Create M aven project\color{#FF3030}{Create Maven project}Chong Jian M A V E n- item project

In this step, you need to configure the Maven local warehouse yourself.
Insert picture description here
Insert picture description here

2. Configure pom. xtml − It needs to be refreshed after the configuration is completed\color{#FF3030}{Configuration pom.xtml-needs to be refreshed after the configuration is completed}With opposing P O m . X T m LWith opposing finish to the need to brush a new one at

Required for web projects
Insert picture description here

To write the dependency packages needed by the server:
Insert picture description here

3. Prepare web resource folder\color{#FF3030}{Prepare web resource folder}Quasi- prepared w E b resource source file member folder
Insert picture description here
in general we are prepared to a template, each write different front-end code, copy it into more convenient point. Otherwise, you need to configure it manually every time.

Note: The tomcat version and web.xml version should correspond as much as possible.

4. Deploy the project to the tomcat in the idea − If the idea is not configured with tomcat, you need to configure the tomcat first \color{#FF3030}{Deploy the project to the tomcat in the idea-if the idea is not configured with tomcat, you need to configure the tomcat first}The term mesh portion Agency to I D E A in the T O m C A TAs if I D E A did not have a feature set T O m C A T , the need to first row with opposed T O m C A T

Insert picture description here
Insert picture description here
Insert picture description here

5. Verify the configuration: execute the package command, the war package can be successfully printed\color{#FF3030}{Verify the configuration: execute the package command, the war package can be successfully printed}Test card with set : perform line P A C K A G E command command , can to work playing a W A R & lt packet

Insert picture description here

Front-end development
Insert picture description here

Guess you like

Origin blog.csdn.net/m0_46551861/article/details/112800132