1
resposta

Injection of autowired dependencies failed

Oi! Estou com o erro abaixo:

Error creating bean with name 'convidadoController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private br.com.alura.service.ConvidadoService br.com.alura.listavip.ConvidadoController.service; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [br.com.alura.service.ConvidadoService] 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)}

Obrigado

1 resposta

Você mapeou sua classe ConvidadoService como @Service? O Spring só pode fazer a injeção das classes mapeadas.