Create a spring/spring boot project with idea
1. Select File ➞ Project
2. Select Spring Initializer ➞ jdk select version 1.8 ➞ next
3. Enter project information
Enter the group Group ➞ project name Artifact ➞ select maven management ➞ select Java Version 8 ➞ modify the project information according to the actual situation ➞ next
4. Select the spring boot version ➞ dependent packages required by the project ➞ next
Select the configuration dependency package used in development, or not, and add the corresponding jar to the pom when it is used
5. Modify the project name and project location ➞ finish
You can also not modify
6. Configure maven information
You can also use idea’s default.
If an Unable to import maven project: See logs for details error occurs when importing dependencies, it proves that the versions of idea and maven do not match.
7. The project is created
8. Configure port number and other information
9. Test items
Create a new package controller ➞ create a class TestController ➞ write a test method one ➞ start the project
Start successfully, you can see the port number we changed in the configuration file
Open the browser to test the method we just wrote: enter in the address bar——http://localhost:8088/test/one The
interface test is successful, and you can write code according to your needs later! ! !