springboot项目启动后,用浏览器访问项目后的异常处理:
ERROR 3912 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [/springboot03] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.UnsupportedOperationException
### The error may exist in file [E:\TestJavaSE\Test\springboot_all\springboot03\target\classes\mybatis\userMapper.xml]
### The error may involve com.msb.mapper.UserMapper.findAllUser
### The error occurred while handling results
### SQL: select * from user;
### Cause: java.lang.UnsupportedOperationException] with root cause
原因分析:
mapper.xml映射文件内的
resultType="list">写错
错误纠正:
将resultType="list">改为resultType="user">后重新运行项目后正常访问