Description: 
Field mapper in com.XXXm.BaseServiceImpl required a bean of type ‘tk.mybatis.mappermon.Mapper’ that could not be found. 
Action: 
Consider defining a bean of type ‘tk.mybatis.mappermon.Mapper’ in your configuration.

关键字: 

No qualifying bean found for dependency [tk.mybatis.mappermon.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.3.RELEASE)

[2018-05-28 15:40:53.492][INFO]com.yizhihui.App:48 Starting App on YU99FVBBMH6YX6N with PID 13368 (E:\workspace\JedisDemo\target\classes started by jpt in E:\workspace\JedisDemo)
[2018-05-28 15:40:53.495][INFO]com.yizhihui.App:661 No active profile set, falling back to default profiles: default
[2018-05-28 15:40:53.579][INFO]org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext:582 Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@170f470: startup date [Mon May 28 15:40:53 CST 2018]; root of context hierarchy
[2018-05-28 15:40:53.754][INFO]org.hibernate.validator.internal.util.Version:30 HV000001: Hibernate Validator 5.2.4.Final
[2018-05-28 15:40:55.474][INFO]org.springframework.data.repository.config.RepositoryConfigurationDelegate:170 Multiple Spring Data modules found, entering strict repository configuration mode!
[2018-05-28 15:40:55.566][INFO]org.springframework.data.repository.config.RepositoryConfigurationDelegate:170 Multiple Spring Data modules found, entering strict repository configuration mode!
[2018-05-28 15:40:55.788][WARN]org.springframework.context.annotation.ConfigurationClassPostProcessor:373 Cannot enhance @Configuration bean definition 'myBatisMapperScannerConfig' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.
[2018-05-28 15:40:56.175][INFO]org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:325 Bean 'org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Generic' of type [class org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Generic] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[2018-05-28 15:40:56.368][INFO]org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:325 Bean 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' of type [class org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[2018-05-28 15:40:56.457][INFO]org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:325 Bean 'dataSource' of type [class com.alibaba.druid.pool.DruidDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[2018-05-28 15:40:56.464][INFO]org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:325 Bean 'org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration' of type [class org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$c3a18fb6] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[2018-05-28 15:40:56.495][INFO]org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:325 Bean 'dataSourceInitializer' of type [class org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[2018-05-28 15:40:56.496][INFO]org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:325 Bean 'myBatisConfig' of type [class com.yizhihuimon.MyBatisConfig$$EnhancerBySpringCGLIB$$5904d8dd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[2018-05-28 15:40:56.528][INFO]org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:325 Bean 'annotationDrivenTransactionManager' of type [class org.springframework.jdbc.datasource.DataSourceTransactionManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[2018-05-28 15:40:56.530][INFO]org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:325 Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$e1adec56] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[2018-05-28 15:40:57.488][INFO]org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer:87 Tomcat initialized with port(s): 8080 (http)
[2018-05-28 15:40:57.521][INFO]org.apache.catalina.core.StandardService:179 Starting service Tomcat
[2018-05-28 15:40:57.523][INFO]org.apache.catalina.core.StandardEngine:179 Starting Servlet Engine: Apache Tomcat/8.5.6
[2018-05-28 15:40:57.684][INFO]org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:179 Initializing Spring embedded WebApplicationContext
[2018-05-28 15:40:57.685][INFO]org.springframework.web.context.ContextLoader:276 Root WebApplicationContext: initialization completed in 4106 ms
[2018-05-28 15:40:57.826][INFO]org.springframework.boot.web.servlet.ServletRegistrationBean:190 Mapping servlet: 'dispatcherServlet' to [/]
[2018-05-28 15:40:57.832][INFO]org.springframework.boot.web.servlet.FilterRegistrationBean:258 Mapping filter: 'characterEncodingFilter' to: [/*]
[2018-05-28 15:40:57.833][INFO]org.springframework.boot.web.servlet.FilterRegistrationBean:258 Mapping filter: 'simpleCORSFilter' to: [/*]
[2018-05-28 15:40:58.389][WARN]org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext:550 Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'riskAsesmtCommentServiceImpl': Unsatisfied dependency expressed through field 'mapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'tk.mybatis.mappermon.Mapper<com.yizhihui.entity.RiskasesmtComment>' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
[2018-05-28 15:40:58.391][INFO]org.apache.catalina.core.StandardService:179 Stopping service Tomcat
[2018-05-28 15:40:58.421][WARN]org.apache.catalina.loader.WebappClassLoaderBase:179 The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
[2018-05-28 15:40:58.433][INFO]org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer:101 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
[2018-05-28 15:40:58.542][ERROR]org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter:42 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field mapper in com.yizhihui.base.BaseServiceImpl required a bean of type 'tk.mybatis.mappermon.Mapper' that could not be found.


Action:

Consider defining a bean of type 'tk.mybatis.mappermon.Mapper' in your configuration.

这个报错意思是说,Mapper没有找到!

很奇怪我的当前一个功能没有用到Mapper层,所以就没有引用Mapper。结果就报这个错了。

给service层的类中添加了其对应的 Mapper类后,就OK了。

更多推荐

Consider defining a bean of type ‘tk.mybatis.mapper.common.Mapper’ in your confi