Buscar
Social
Ofertas laborales ES

Foro sobre Java EE > Spring mvc

Hola

Tengo un controller donde utilizo @Autowired:

@Controller
@RequestMapping("/cocheAlta.htm")
public class cocheAltaController {

protected final Log logger = LogFactory.getLog(getClass());

@Autowired
CocheValidator cocheValidator;

@Autowired
private ConstructorManager constructorManager;

.....resto de la clase

la clase ContructorManager es:

@Component
public interface ConstructorManager extends Serializable {

public List<Constructor> getConstructor();

//public void increasePrice(int percentage);
}

Me da el siguiente error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cocheAltaController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private arf.coches.springapp.service.ConstructorManager arf.coches.springapp.web.cocheAltaController.constructorManager; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [arf.coches.springapp.service.ConstructorManager] 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)}

Comentar que el primer Autowired funciona correctamente.

Me podeis dar alguna pista, he intentado de todo y no consigo nada.

Muchas gracias

julio 22, 2015 | Unregistered CommenterArf2774