How to add org.springframework.scheduling.concurrent to spring boot pom.xml file?

I have created a simple spring mvc application using spring-boot-starter-thymeleaf and STS. Now I want to add an asynchronous task and need to add org.springframework.scheduling.concurrent as a dependency. The exact error message is

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

Please help me to figure out how to add the missing dependency.

My pom.xml is as follows:

<project xmlns="" xmlns:xsi=""










You seem to have the dependency in place. All you need to do is to set up a bean for the ThreadPoolTaskExecutor. Example:

public ThreadPoolTaskExecutor taskExecutor(){
    ThreadPoolTaskExecutor pool = new ThreadPoolTaskExecutor();
    return pool;

Just add @EnableAsync annotation to your configuration to enable asynchronous methods.

Need Your Help

matplotlib issues when nan first in list

python graph matplotlib nan figure

I have two lists of numbers which I'm using matplotlib to graph in Python. However if one of the lists begins with the value of nan, matplotlib will not graph any of the 15k+ points I have. However...

Overlay div block with the image while AJAX loading

javascript jquery html css ajax

I know this is easy task and very common, but I cannot figure out how to do this ! It seems five minute task, but I have spent more than an hour... I am stupid I know.