Common SpringBoot mistakes

1.Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection;

The configuration file cannot have spaces before and after the equal sign, otherwise the parsing will fail.



2. The startup class should be one level above other classes that require annotation scanning, or at the same level (preferably the previous level)


3. The access address does not need to add the application name, just write the address and add the method directly



4. Create the web form of the maven project. When entering the index.jsp error, a red cross is displayed. Generally, tomcat is not loaded.



5. If a certain class cannot be found, it means that the jar package was not successfully downloaded, delete it in the warehouse, and then download it again.


6. There is no error in the maven project but there is always a red cross, set the JDK version in a unified way



7.pom.xml always has a red cross. Indicates that the download of the jar package is wrong

Project ---- Right ---- Runas --- MavenTest -- see if maven is running wrong, then maven install  

-----> Then right click on the project ---> Maven ---updateProject


Keep a record and continue to add later


Guess you like

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