Maven项目连接MySQL
添加依赖
<!-- mysql 依赖 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
错误提示:
Project build error: 'dependencies.dependency.version' for mysql:mysql-connector-java:jar is missing
新增依赖信息
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath />
</parent>

本文介绍了在Java Maven项目中连接MySQL时遇到的问题,包括Maven依赖添加错误和`java.sql.SQLException: Operation not allowed after ResultSet closed`的解决方案。文章详细讲述了如何正确配置MySQL连接依赖,并分析了导致ResultSet关闭的原因。
最低0.47元/天 解锁文章
1230

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



