2021-04-24 16:42:08.041 - WARN [ restartedMain] c.s.AbstractApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'oaMassageController': Unsatisfied dependency expressed through field 'oaMassageService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'oaMassageService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'timeIntervalDao' is expected to be of type 'com.cowain.base.modules.oa.dao.OaMassageTimeStageDao' but was actually of type 'com.sun.proxy.$Proxy255'
2021-04-24 16:42:08.043 - INFO [ restartedMain] o.s.s.q.SchedulerFactoryBean : Shutting down Quartz Scheduler
2021-04-24 16:42:08.044 - INFO [ restartedMain] o.q.c.QuartzScheduler : Scheduler quartzScheduler_$_NON_CLUSTERED shutting down.
2021-04-24 16:42:08.044 - INFO [ restartedMain] o.q.c.QuartzScheduler : Scheduler quartzScheduler_$_NON_CLUSTERED paused.
2021-04-24 16:42:08.044 - INFO [ restartedMain] o.q.c.QuartzScheduler : Scheduler quartzScheduler_$_NON_CLUSTERED shutdown complete.
2021-04-24 16:42:08.050 - INFO [ restartedMain] e.i.a.AbstractAsyncJobExecutor : Shutting down the default async job executor [org.activiti.spring.SpringAsyncExecutor].
2021-04-24 16:42:08.050 - INFO [ Thread-49] e.i.a.AcquireTimerJobsRunnable : stopped async job due acquisition
2021-04-24 16:42:08.050 - INFO [ Thread-50] .a.AcquireAsyncJobsDueRunnable : stopped async job due acquisition
2021-04-24 16:42:08.075 - INFO [ restartedMain] stractEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2021-04-24 16:42:08.087 - INFO [ restartedMain] c.a.d.p.DruidDataSource : {dataSource-1} closed
2021-04-24 16:42:08.088 - INFO [ restartedMain] o.a.j.l.DirectJDKLog : Stopping service [Tomcat]
2021-04-24 16:42:08.101 - INFO [ restartedMain] valuationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-04-24 16:42:08.105 -ERROR [ restartedMain] LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'timeIntervalDao' could not be injected as a 'com.cowain.base.modules.oa.dao.OaMassageTimeStageDao' because it is a JDK dynamic proxy that implements:
com.baomidou.mybatisplus.mapper.BaseMapper
Action:
Consider injecting the bean as one of its interfaces or forcing the use of CGLib-based proxies by setting proxyTargetClass=true on @EnableAsync and/or @EnableCaching.
//因为你在Serivice注入Dao用的@Resource 但却没有取那个默认名字(偷懒简写,使得名字和Dao默认名字不同)。用@Resource的话,属性名字取默认那种首字母小写后的类驼峰全名即可