Problem may be that you have badly configured IDEA project files.
Close IDEA, delete all .idea files and reimport project.
Answer from MarekM on Stack OverflowProblem 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.
IntelliJ IDEA 2022.3 Community Edition not showing Spring Boot as an option for Run Configurations - Stack Overflow
Intellij Spring Boot project run configuration - Stack Overflow
java - Intellij Does not have run button when running Springboot Applications - Stack Overflow
No matter how I create my Spring boot project, IntelliJ is unable to recognize the dependencies in pom file and more!
Videos
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.
This should help you get started.

You have imported the project at the wrong folder level. your folder structure seems to be like demo/demo/src.
You imported the project at demo whereas you should have imported it at demo/demo.
When you import it you want src/ and pom.xml to be at the root of the project.
Also when you import it the src/ folder should be blue, that is how you know you have imported it correctly.

As a rule of thumb you should always make sure a pom.xml is at the root of the import when working with maven
you have to set project SDK first, then it can be run from main class.
File -> project structure -> project -> set project SDK from dropdown, download or browse jdk bin path
short key: CTRL+ALT+SHIFT+S
Go to the main class and run or add configuration from the menu
Like the title states, it doesn't matter if I create a new Spring project using the initialzr, maven archetype, or just standard java project, the dependencies I place in the pom file cannot be located unless I have it completely rebuild the project.
Furthermore, I believe it's having general issues with my pom file since the behavior that I see in the app does not line up with that I am expecting, i.e. projects will stop running immediately even if the spring-boot-starter-web dependency is in my pom file.
It's getting to the point that I dread having to create a new project in IntelliJ.
I'm not looking for temporary solutions since this occurs with every project now. How should I proceed? Would a fresh reinstall of IntelliJ help? Are there any downsides to that?
I apologize if this post is lacking in details, but that's partially because I'm venting my frustration and because I'm not sure how helpful details will be given that this is an ongoing issue.
