[使用Eclipse将mysql与Java连接时出错

问题描述 投票:0回答:1

我从以下位置获取异常SQLSyntaxErrorException

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. java.sql.SQLSyntaxErrorException: Table 'helloworld.emp' doesn't exist

我该怎么解决?

java mysql eclipse jdbc
1个回答
0
投票

替换:

spring.datasource.driver-class-name = com.mysql.jdbc.Driver

从application.properties到:

spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver

© www.soinside.com 2019 - 2024. All rights reserved.