IDEA (macOS version) uses maven to build Spring Boot projects

1. Introduction to IDEA software

IDEA's full name is IntelliJ IDEA, which is an integrated environment for java language development. IntelliJ is recognized as one of the best java development tools in the industry, especially in intelligent code assistants, automatic code prompts, refactoring, J2EE support, Ant, JUnit, CVS integration , code review, innovative GUI design and other features can be said to be extraordinary. IDEA is a product of JetBrains, a company headquartered in Prague, the capital of the Czech Republic, whose developers are mainly Eastern European programmers known for their rigor.

Second, the macOS version IDEA installation

Official website address : https://www.jetbrains.com/idea/

You can download and install it by yourself. It is mainly divided into two versions: Ultimate (Ultimate Edition) and Community (Community Edition)
The difference between Ultimate Edition and Community Edition.png
The Ultimate Edition is more powerful, as can be seen from the support of the above features. The flagship version can be tried for 30 days, and the community version is free.
We develop the Spring Boot project here, and we still need to download and install the flagship version.

Third, use maven to build Spring Boot

1. New project

Create New Project.png

2. Select Spring Initializr build

Spring Initializr.png

3. Set project information

New Project.png

4. Select Dependency as Web

Select Web.png

5. Set the project name

Project Name.png

6. Wait for IDEA to download Spring Boot's maven dependencies

7. Delete unnecessary files and folders

delete unwanted files.png

8. The construction of the above simple Spring Boot project is completed

9. Create a controller

Create a new controller package and create a DemoController class.
Create Controller.png

Execute the SpringApplication.java class
Start Spring Boot.png

10. Test Hello, Spring Boot

After the Spring Boot project starts, open the browser: http://localhost:8080/hello
Hello.png

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326263778&siteId=291194637