tengo un error que al crear un proyecto simple con spring boot tengo un controlador , un servicio y una vista el error que me tira es este
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-05-29 16:34:49.209 ERROR 10176 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
*************************** APPLICATION FAILED TO START
Description:
Field servicio in com.jose.controllers.HomeController required a bean of type 'com.jose.services.HomeService' 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 'com.jose.services.HomeService' in your configuration.
package com.jose.controllers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.jose.services.HomeService;
@Controller
public class HomeController {
@Autowired
private HomeService servicio;
@RequestMapping("lista")
public String lista() {
return servicio.lista();
}
@RequestMapping("eliminar")
public String eliminar() {
return "eliminar";
}
}
el servicio
package com.jose.services;
import org.springframework.stereotype.Service;
@Service
public class HomeService {
public String lista() {
return "lista";
}
public String eliminar() {
return "eliminar";
}
}
y las vistas
en los templates que son eliminar.html , eliminar.html
com.jose.service
porque no se le ha indicado. ¿Cuál es el paquete donde está la clase que inicia todo? ¿Cómo es el fichero de configuración?