table of Contents
Create project
1.Select create new project, Create a new project
2. Select the project type asJava Enterprise, And configure JDK and other information
3.勾选 create project from template, This option will generate a project template, reducing the workload of post-configuration
4.Name the project, Other defaults, generally do not need to be changed
5. Complete the project creation, the project structure is as follows
Configuration item
1. Import the external class library and publish it to the Tomcat server.
in caseDon't do this, There is no error when running locally, butAfter publishing to the server, it will throw a ClassNotFoundException
Find file → project structure in the menu bar…
select modules…
select the jar package path
It is recommended to put jar packages commonly used in development in a folder
Click Finish to
add the selected √ before the class library appears after Problems in a circle 1
Click Fix, ... Select the Add
2. Configure the Tomcat server
, if not the beginning of a Tomcat server configuration, you need to click add configurtion in the top right idea ...
then Click + to add Tomcat server
If the server has been added when creating a new project, proceed directly to this step.
Click the Tomcat server in the upper right corner of the idea, and select the first edit in the drop-down box
Configure Tomcat server
OK, the end.