Consider defining a bean of type ‘tk.mybatis.mapper.common.Mapper’ in your configuration.
来源:互联网 发布:mysql主从复制配置 编辑:程序博客网 时间:2024/04/29 00:07
Description:
Field mapper in com.XXX.comm.BaseServiceImpl required a bean of type ‘tk.mybatis.mapper.common.Mapper’ that could not be found.
Action:
Consider defining a bean of type ‘tk.mybatis.mapper.common.Mapper’ in your configuration.
关键字:
No qualifying bean found for dependency [tk.mybatis.mapper.common.Mapper com.xx.model.QixiGameInfo>]: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v1.4.1.RELEASE)...............[ WARN ] [2017-07-26 13:50:33:033] org.springframework.beans.factory.support.DefaultListableBeanFactory [1490] [main]- Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userInfoMapper' defined in file [G:\workspace-s\xxWorkspace\qixi\qixi-dao\target\classes\com\xx\dao\UserInfoMapper.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.xx.dao.xxxMapper.universeListResultMap[ WARN ] [2017-07-26 13:50:33:033] org.springframework.beans.factory.support.DefaultListableBeanFactory [1490] [main]- Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRelationMapper' defined in file [G:\workspace-s\xxWorkspace\qixi\qixi-dao\target\classes\com\xx\dao\UserRelationMapper.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.xx.dao.xxxMapper.universeListResultMap[ WARN ] [2017-07-26 13:50:33:033] org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext [549] [main]- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'queryGameListController': Unsatisfied dependency expressed through field 'xxxService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxxServiceImpl': Unsatisfied dependency expressed through field 'mapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean found for dependency [tk.mybatis.mapper.common.Mapper<com.xx.model.QixiGameInfo>]: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxxMapper' defined in file [G:\workspace-s\xxWorkspace\qixi\qixi-dao\target\classes\com\xx\dao\xxxMapper.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.xx.dao.xxxMapper.universeListResultMapRelated cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userInfoMapper' defined in file [G:\workspace-s\xxWorkspace\qixi\qixi-dao\target\classes\com\xx\dao\UserInfoMapper.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.xx.dao.xxxMapper.universeListResultMapRelated cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRelationMapper' defined in file [G:\workspace-s\xxWorkspace\qixi\qixi-dao\target\classes\com\xx\dao\UserRelationMapper.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.xx.dao.xxxMapper.universeListResultMapRelated cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxxMapper' defined in file [G:\workspace-s\xxWorkspace\qixi\qixi-dao\target\classes\com\xx\dao\xxxMapper.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.xx.dao.xxxMapper.universeListResultMapRelated cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userInfoMapper' defined in file [G:\workspace-s\xxWorkspace\qixi\qixi-dao\target\classes\com\xx\dao\UserInfoMapper.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.xx.dao.xxxMapper.universeListResultMapRelated cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRelationMapper' defined in file [G:\workspace-s\xxWorkspace\qixi\qixi-dao\target\classes\com\xx\dao\UserRelationMapper.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.xx.dao.xxxMapper.universeListResultMap[ INFO ] [2017-07-26 13:50:33:033] org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean [551] [main]- Closing JPA EntityManagerFactory for persistence unit 'default'[ INFO ] [2017-07-26 13:50:33:033] com.alibaba.druid.pool.DruidDataSource [1383] [main]- {dataSource-1} closed[ INFO ] [2017-07-26 13:50:33:033] org.apache.catalina.core.StandardService [183] [main]- Stopping service Tomcat[ INFO ] [2017-07-26 13:50:33:033] org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer [101] [main]- Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.[ ERROR] [2017-07-26 13:50:33:033] org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter [42] [main]- ***************************APPLICATION FAILED TO START***************************Description:Field mapper in com.xx.comm.BaseServiceImpl required a bean of type 'tk.mybatis.mapper.common.Mapper' that could not be found.Action:Consider defining a bean of type 'tk.mybatis.mapper.common.Mapper' in your configuration.
这个问题找了两个小时!!!!!最后居然是大小写的问题。。。
<resultMap id="UListResultMap" type="com.XXX.GameUniverseVO"> </resultMap><select id="queryUListById" parameterType="String" resultMap="uListResultMap"></select>
上边的resultMap引用的id大小写错误。。。崩溃
后来又会遇到类似的问题:
只要是找xml配置,你总会找到原因的。
比如parameterType写成了parameterMap等。
阅读全文
0 0
- Consider defining a bean of type ‘tk.mybatis.mapper.common.Mapper’ in your configuration.
- Consider defining a bean of type 'com.taikang.service.ChongyGameInfoService' in your configuration.
- Consider defining a bean of type 'com.xxx.service.impl.xxxImpl' in your configuration
- Maven多模块开发Action:Consider defining a bean of type '*.*.*' in your configuration解决
- 关于spring boot自动注入Consider defining a bean of type 'X' in your configuration
- 搬砖中的小事之代码(二)--报错Consider defining a bean of type...in your configuration
- 关于spring boot自动注入出现Consider defining a bean of type 'xxx' in your configuration问题解决方案
- 关于spring boot自动注入出现Consider defining a bean of type 'xxx' in your configuration问题解决方案
- 关于spring boot自动注入出现Consider defining a bean of type 'xxx' in your configuration问题解决方案
- 处理异常:Consider defining a bean of type 'xxx' in your config
- No MyBatis mapper was found in 'XXX' package. Please check your configuration
- tk.mapper mybatis 插件注意点
- mybatis+spring cannot find *Mapper bean
- maven + Mybatis 运行时The error may exist in SQL Mapper Configuration
- No qualifying bean of type [com.jj.mapper.UserMapper] found for dependency
- No MyBatis mapper was found in '' package. Please check your configura, Could not autowire field
- mybatis Field xxxMapper in xxxx required a bean of type 'XXXMapper' that could not be found.
- spring boot 报错 Invalid property 'mapperHelper' of bean class [org.mybatis.spring.mapper.MapperFactor
- no module named pydot
- 【VS开发】Visual C++内存泄露检测—VLD工具使用说明
- 生成iOS下的dylib
- android studio jni开发详解
- JDK源码-Collection-clear()
- Consider defining a bean of type ‘tk.mybatis.mapper.common.Mapper’ in your configuration.
- Overload和Override的区别
- #include<string.h>中的转换函数的使用
- centos7下yum安装mysql
- 推荐:MHA:MySQL高可用架构的利器
- Android开发WiFi的基本使用
- MongoDB设置服务项
- 如何实现JavaScript的Map和Filter函数?
- 如何管理团体