SpringBoot 自动注入TaskExecutor taskExecutor失败
需要自动注入失败
Description:
Field taskExecutor in com.sbmbp.download.DownloadManage required a bean of type ‘org.springframework.core.task.TaskExecutor’ that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type ‘org.springframework.core.task.TaskExecutor’ in your configuration.
这种错误 通常都是spring 为把配置的实体没有加载到spring 上下文中
如
在学习多线程的时候 使用到TaskExecutor
在config配置文件中加上
解决这个问题。