Spring Boot develop common errors and solutions

Failed to start component [Connector[HTTP/1.1-80]]::Port is occupied, yml configuration file to change the port
3TGCQF25BLHU9R7IQUITN0FCC5
CLIENT_PLUGIN_AUTH is required] with root cause :MySQL version of the problem, pom change the version dependency
useUnicode=true&characterEncoding=utf-8 :when setting area serverTimezone=UTCas early as 8 hours time than China, if the Chinese can be set serverTimezone=Shanghaior serverTimezone=Hongkong, for example:
driverClassName=com.mysql.cj.jdbc.Driver url=jdbc:mysql://localhost:3306/test?serverTimezone=Shanghai&?useUnicode=true&characterEncoding=utf8&useSSL=false username=root password=root

Error creating bean with name 'userController'Start scanning type frame package@ComponentScan(basePackages = { "com.example.controller" }) Field userServiceImpl in com.hxz.controller.UserController required a bean of type 'com.hxz.service. @ComponentScan(basePackages = { "com.example.service.impl })

The Tomcat connector configured to listen on port 8081 failed to start. The port may already be in use or the connector may be misconfigured.: Change the port number

错误: 找不到或无法加载主类 com.hxz.SpringBootBlogApplication :Right-click the pom, and then click to select maven clean install Maven
springboot console debug sql: properties file frame logging.level.com.hxz.mapper=debugin which logging.level.com.your package Mapper = log level
attempted to return null from a method with a primitive return type (int).mapper file return value, attention is int or String type
Unable to infer base url. This is common when using dynamic servlet registration or when the API is .....(swagger error) startup class notes plus EnableSwagger2
springboot集成thymeleaf中遇到不能返回页面,只返回字符串。reasons : using controller in the notes @RestController Review: modify annotated @Controller
startup class exception: can not find startup classes or start class main function abnormalities
often maven cache problem, the most effective way is to delete and re-download

.....\.m2\repository\org\springframework下的所有文件删除
重新下载,启动类不报错。其他的类似问题基本解决办法也是如此,比如我的依赖包拉下来了却发现仍然报classnotfoundexpextion的错误,删除即可!
Released nine original articles · won praise 73 · views 8740

Guess you like

Origin blog.csdn.net/AAAhxz/article/details/103537146