Springboot的报错集合(1)
1、MySQL未启动
报错,项目启动失败
2022-01-19 18:09:01.111 ERROR 10768 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
原因:
mysql没有启动,或者MySQL的配置问题。
我的解决方法:
net start mysql
仅限于电脑配置了MySQL环境,启动MySQL成功如下
重启spring boot项目,项目启动成功
2、Controller层的重复响应头
报错,项目启动失败
2022-01-19 20:07:27.684 ERROR 12012 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested e