Wiosna oczekiwała co najmniej 1 komponentu bean, który kwalifikuje się jako kandydat do automatycznego wyłączenia dla tej zależności

Mam problem z tym Autowire:

@Controller
public class ChiusuraController {

    @Autowired
    private ChiusuraProvider chiusuraProvider;
}

z tym ziarnem:

@Service @Transactional
public class ChiusuraProvider extends ThreadProvider {


    public void run() {}
}

to się rozszerza

public abstract class ThreadProvider extends Thread implements InitializingBean, Runnable, DisposableBean {
...
}

Dostaję ten błąd:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chiusuraController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.cinebot.service.ChiusuraProvider com.cinebot.web.controller.ChiusuraController.chiusuraProvider; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.cinebot.service.ChiusuraProvider] 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)}

Widziałem, że nie usunąłem tego błędurozszerza ThreadProvider klasy autowired, ale naprawdę potrzebuję klasy abstrakcyjnej ThreadProvider.

questionAnswers(2)

yourAnswerToTheQuestion