Error creating bean with name 'sqlSessionFactory' defined in class path resource

Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.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 [xxx/mapper\TbCarMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [xxx/mapper\TbCarMapper.xml]'. Cause: java.lang.ClassCastException: com.baomidou.mybatisplus.core.MybatisConfiguration$StrictMap$Ambiguity cannot be cast to org.apache.ibatis.mapping.ResultMap

第1个回答  2021-06-28
一般这种问题,很有可能就是数据库连接不上。
检查你的,数据库连接字符串(配置)
相似回答