Error attempting to get column ‘update_time‘ from result set. Cause: java.sql.SQLFeatureNotSupporte

mybatis-plus针对数据库中日期类型datetime,自动生成代码时,日期对应关系,在执行时报错的问题

Error attempting to get column 'update_time' from result set. Cause: java.sql.SQLFeatureNotSupportedException ; null; nested exception is java.sql.SQLFeatureNotSupportedException
org.springframework.dao.InvalidDataAccessApiUsageException: Error attempting to get column 'update_time' from result set.  Cause: java.sql.SQLFeatureNotSupportedException
; null; nested exception is java.sql.SQLFeatureNotSupportedException

我的尝试处理方法是,mysql 驱动包版本/ druid包的版本号,mybatis-plus版本号都改大一些,最好使用最半年的最新包,因为使用mysql8的话,若要兼容日期的话,只有后续的版本才会处理解决这样的问题

<!--mysql-->
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>8.0.18</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid-spring-boot-starter</artifactId>
			<version>1.1.23</version>
		</dependency>
		
		<!-- mybatis plus 代码生成器 -->
		<dependency>
			<groupId>com.baomidou</groupId>
			<artifactId>mybatis-plus-boot-starter</artifactId>
			<version>3.3.2</version>
		</dependency>
		<dependency>
			<groupId>com.baomidou</groupId>
			<artifactId>mybatis-plus-generator</artifactId>
			<version>3.3.2</version>
		</dependency>
		<dependency>
			<groupId>org.freemarker</groupId>
			<artifactId>freemarker</artifactId>
			<version>2.3.28</version>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
			<version>1.2.47</version>
		</dependency>

下面这个地址只供没有解决问题的小伙伴参考,我是没有尝试成功
参考地址:https://blog.csdn.net/qq_41463655/article/details/106948345

你可能感兴趣的:(mybatis-plus)