Please follow the following steps:
Set the maven goal by clicking the "+" in IntelliJ (circled area)

Write
mvn install.
Set the VM Options as:
-Dspring.profiles.active=development
After that it should just run fine just by clicking the green play button.
Answer from Ali on Stack OverflowPlease follow the following steps:
Set the maven goal by clicking the "+" in IntelliJ (circled area)

Write
mvn install.
Set the VM Options as:
-Dspring.profiles.active=development
After that it should just run fine just by clicking the green play button.
This should help you get started.

java - IntelliJ Run Configuration for Spring Boot apps? - Stack Overflow
java - intellij run configuration can't find spring boot class - Stack Overflow
java - Spring Boot project in IntelliJ community edition - Stack Overflow
How to run a spring boot code for the first time
Videos
Problem may be that you have badly configured IDEA project files.
Close IDEA, delete all .idea files and reimport project.
The same issue occured to me. In my case, it was the project JDK that was not set. The module JDK was set, but not the project one.
Go to File > Project Structure > Project > Project SDK to solve the issue.
You can install a plugin called Spring Assistant:
Now you can use the initializer as:
Personally, however, I use Spring initializer at start.spring.io
EDIT: Adding run configuration
Select Edit Configuration from the Run menu
Now in the dialog box, lick on the + button and select Application.
Now you just need to provide the name of the main class. You could click on the browse button(...) to get a list of files having main(...).

As everyone else mentioned, use https://start.spring.io to start your Spring Boot project. Download and open in IntelliJ Community Edition.
Where you will face some difficulty is in running the project; - Ultimate Edition has a Spring Boot plugin that is missing in Community Edition.
You may get errors especially if your main folder of your project is one level higher than the root of your IntelliJ project.
For this, use the Maven run option.
Edit Configuration and Click the + to create a new Maven configuration
