java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.jt.mapper.EmpMapper.dept
名字写错了
Invalid bound statement (not found): com.jt.mapper.UserMapper.findUserByNA2
xml中可能id的名字不匹配
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field
'userMapper'; nested exception isorg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file
[F:\cgb2107\springboot_ssm2\target\classes\com\jt\mapper\UserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource
[org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.
BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception;
nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [F:\cgb2107\springboot_ssm2\target\classes\mybatis\mappers\mybatis-config.xml]';
nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [F:\cgb2107\springboot_ssm2\target\classes\mybatis\mappers\mybatis-config.xml]'. Cause: java.lang.NullPointerException
因为配置了yml所有不用mybatis的配置文件
Invalid bound statement (not found): com.jt.mapper.UserMapper.findUserByIds
xml配置文件找不到(可能出现了名字重复的问题检查一下是否有重复的ID)
Parameter 'id' not found. Available parameters are [array, arg0]
id找不到可能是写错了
org.apache.ibatis.binding.BindingException: Type interface com.jt.mapper.UserMapper is not known to the MapperRegistry.
检查namespace命名是否与接口一致
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.jt.mapper.UserMapper.findAll
检查xml映射文件中的ID是否与接口方法一致.
The error may exist in mybatis/mappers/UserMapper2.xml
检查mybatis核心文件加载mapper映射文件的路径是否正确.
Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration.
Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML.
The XML location is ‘mybatis/mappers/demoUserMapper.xml’.
Cause: org.apache.ibatis.builder.BuilderException: Error resolving class.
Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘DemoUser’.
Cause: java.lang.ClassNotFoundException: Cannot find class: DemoUser
问题可能是xml映射文件中的resultType的类型异常.
org.apache.ibatis.binding.BindingException: Mapper method 'com.jt.mapper.DemoUserMapper.findNames' has an unsupported return type: interface java.util.List
进行更新操作不需要返回值我给他配置了返回值