按照网上的提示在pom.xml添加了依赖
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
</dependency>
版本标红,在本地mean仓库C:\Users\用户名.m2\repository下发现本地版本是8.0.28,改成这个之后不标红了,但是运行依然报错
继续寻找办法,在File/Project Structure/Project Settings/Modules中将本地的jar文件导入到Module/Dependencies中后就能成功运行了标签:lang,8.0,Exception,jdbc,java,ClassNotFoundException,报错,mysql From: https://www.cnblogs.com/syrup-/p/17265082.html