Create a spring or spring boot project with idea

Create a spring/spring boot project with idea

1. Select File ➞ Project

create project

2. Select Spring Initializer ➞ jdk select version 1.8 ➞ next

Select the spring project

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
Enter project information

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
Select spring version and dependencies

5. Modify the project name and project location ➞ finish

You can also not modify
Project path configuration

6. Configure maven information

You can also use idea’s default.
maven configuration
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.
Dependency import failed

7. The project is created

Project created

8. Configure port number and other information

Configure the port number

9. Test items

Create a new package controller ➞ create a class TestController ➞ write a test method one ➞ start the project
write a test method
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
Authentication interface
interface test is successful, and you can write code according to your needs later! ! !

Guess you like

Origin blog.csdn.net/qq_42547733/article/details/128659409
Recommended