The first springboot project-HelloWorld

Question one

The package imported by the Maven project into org.framework.boot appears in red and shows that it cannot be parsed.

Solution:

Create a repository file in the maven file and rewrite the address of the ontology warehouse to this location.

Problem 2: Error when running the project

Appear

 

 

It has not been solved yet. I checked the solution on the Internet and found different opinions. Some said that the JDK version was too high, and some said that the imported springboot dependency version was too high.

After debugging, I found that the reason was that my version was JDK19, which was too high. I changed the JDK version to 1.8 and it ran successfully.

I can only say that I am too naive. After I first changed the JDK version, even the String variable reported an error, saying that it could not be parsed. Then I looked for other problems. I searched all afternoon and couldn't find the reason. In the evening, it was fine again. , runs successfully.

File->Project Structure->Project->SDK changed to 1.8

 

 

Guess you like

Origin blog.csdn.net/m0_57665268/article/details/129503632