解决maven项目jdbc报错:java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

博主使用flink连接数据库时报错,完整报错是:switched from INITIALIZING to FAILED with failure cause: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

解决方法

pom.xml文件添加配置项:

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.11</version>
        </dependency>

猜你喜欢

转载自blog.csdn.net/weixin_35757704/article/details/121127681