Discussion on the issue that the startup class does not display the startup button after IDEA creates the springboot project

Problem Description:

I recently planned to create a springboot project to develop the WeChat applet backend. However, after creating the project, I found that the startup class did not have a startup entry and showed that it was CurrentFile. The file style was also different from what was displayed before. I understand that it was not recognized as a Java project file. but a normal file
Insert image description here


solution:

Right-click the pom.xml file, select Add as Maven Project
Insert image description here
and wait...

Insert image description here
After waiting for a few minutes, waiting for the maven dependencies to be downloaded, the startup sign has appeared.
Insert image description here
Finally, let's start it and try it:
Insert image description here
Oh, the JDK version is not supported. I thought about it, and it should be that the version I selected when I created the springboot project was 3.0. 5. As a result, JDK must reach 17,
Insert image description here
so I can only change the version:
Insert image description here
After adjusting the version, run it again:
Insert image description here
it has been successfully run.
Summary: It’s not scary to encounter problems. What’s scary is that you lose the courage to overcome them. Come on, pay tribute to every practitioner on the road to coding!

Guess you like

Origin blog.csdn.net/qq_40187702/article/details/129976020