springBooot项目启动失败小集锦

 

1.端口冲突问题

***************************
APPLICATION FAILED TO START
***************************

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

分析:端口可能被使用

          解决办法:更换一个端口号或者关闭占用端口的程序

                        关闭占用端口的程序:

                       1.打开cmd命令窗口,输入查看所有端口和PID的指令:netstat -ano

                       2.根据8980端口找到对应的PID为****,然后根据PID查找进程:tasklist | findstr "****"

                       3.杀掉该进程,再次启动就OK啦:taskkill /f /t /im java.exe

 

 

 

 

2.数据库mysql连接失败问题:

  a.        

                 Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

                 分析: 很多的教学视频都比较老,教学使用的mysql版本和你自己本地使用的版本不一致,新版本的mysql需要设置成 “com.mysql.cj.jdbc.Driver”,另外还需要增加一个参数 serverTimezone=UTC

  

        b.        java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)  

     分析:用户名和密码使用错误     data-username 和 data-password,实际应该使用 username 和 password

 

posted @   琮曦  阅读(60)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
点击右上角即可分享
微信分享提示