[Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageExc

SQLErrorCodes loaded: [DB2, Derby, H2, HDB, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
2023-07-04 13:34:05.845 ERROR 10820 --- [nio-8022-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Error attempting to get column 'login_time' from result set.  Cause: java.sql.SQLFeatureNotSupportedException
; ]; null; nested exception is java.sql.SQLFeatureNotSupportedException] with root cause

java.sql.SQLFeatureNotSupportedException: null
	at com.alibaba.druid.pool.DruidPooledResultSet.getObject(DruidPooledResultSet.java:1771) ~[druid-1.1.0.jar:1.1.0]
	at org.apache.ibatis.type.LocalDateTimeTypeHandler.getNullableResult(LocalDateTimeTypeHandler.java:38) ~[mybatis-3.5.9.jar:3.5.9]
	at org.apache.ibatis.type.LocalDateTimeTypeHandler.getNullableResult(LocalDateTimeTypeHandler.java:28) ~[mybatis-3.5.9.jar:3.5.9]
	at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:85) ~[mybatis-3.5.9.jar:3.5.9]
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.applyAutomaticMappings(DefaultResultSetHandler.java:561) ~[mybatis-3.5.9.jar:3.5.9]
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getRowValue(DefaultResultSetHandler.java:403) ~[mybatis-3.5.9.jar:3.5.9]
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForSimpleResultMap(DefaultResultSetHandler.java:355) ~[mybatis-3.5.9.jar:3.5.9]
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:329) ~[mybatis-3.5.9.jar:3.5.9]
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(DefaultResultSetHandler.java:302) ~[mybatis-3.5.9.jar:3.5.9]
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:195) ~[mybatis-3.5.9.jar:3.5.9]

在项目中使用了Mybati-plus,同时使用了druid数据源,由于druid数据源的版本太低,不支持JDK8中的LocalDate、LocalTime、LocalDateTime等日期类型,所以解决方案就是下载新版本的druid依赖
之前的版本是 1.1.0 太老了
在这里插入图片描述

在这里插入图片描述

解决方法

下载版本高于或等于1.1.21以上的jar包


<!--阿里巴巴连接池druid-->
	<dependency>
		<groupId>com.alibaba</groupId>
		<artifactId>druid</artifactId>
		<version>1.2.7</version>
	</dependency>ava

猜你喜欢

转载自blog.csdn.net/weixin_40796433/article/details/131533101