Article Catalog
- 1. Create and add references
- 1.1 Open IDEA and create a new project.
- 1.2 Installing plug-ins and adding references
- 1.3 Wait for the project to finish loading
- 2. Add code to run the program
- 2.1 Introduction to the catalog
- 2.2 Adding control classes to the project
- 2.3 Code Run
- 3. Browser access
1. Create and add references
1.1 Open IDEA and create a new project.
1.2 Installing plug-ins and adding references
Find SpringAssistant on the left side and click on it; if you don't have SpringAssistant, you need to download the plug-in.
Download the plugin in Settings:
Download successfully and create a new project:
ps: The general modification is the Java version.
Install the plug-in SpringAssistant:
Add the reference this way when you create a new project, and then add the reference again when you want to maintain the project later, as follows:
Install the plug-in EditStarters:
Right-click and select Generate:
Select the plugin you just downloaded:
Click OK;
This eliminates the need to look for references from a centralized repository and note the version number that matches the project and download it, as you would have to do to create a Servlet.
1.3 Wait for the project to finish loading
ps: Insert the completed orange label to blue label.
2. Add code to run the program
2.1 Introduction to the catalog
2.2 Adding control classes to the project
ps: 1. Note that the class is added in the java folder in the main directory, not in the java folder in the test directory. The visual difference between the two is that the correct icon should be blue.
2. One of the features of the SpringBoot project is that a class can have multiple url addresses, while the Servlet project can only contain one url in a class.
2.3 Code Run
Find the startup class DemoApplication, in the Java directory, intuitive identification is the blue label with a small green arrow, click Run, the following interface appears to start successfully.
ps: SpingBoot runtime compared to Servlet is more convenient, no need to configure Tomcat; deployment projects also do not need to configure Tomcat.
3. Browser access
IP plus port number plus url address for direct access.
It can also be followed by a parameter.