在学习整合springboot+ jpa的时候,只写了个简单的例子,就报错CommunicationsException: Communications link failure,然后将连接数据库的
url=jdbc:mysql://localhost:3306/db_book?serverTimezone=GMT中的localhost改成127.0.0.1就不报错了,应该是框架不识别。
报错CommunicationsException: Communications link failure
最新推荐文章于 2025-03-15 20:09:19 发布
在尝试使用SpringBoot结合JPA进行数据库操作时,遇到CommunicationsException错误,通过将数据库URL中的localhost替换为127.0.0.1解决了问题,疑似框架对localhost识别存在问题。
2984

被折叠的 条评论
为什么被折叠?



