Como es que no encuentra el bean del tipo seuService si esta marcado como @service... Tiene algo que ver con la estructura del directorio?
Me salta este error:
APPLICATION FAILED TO START
Description:
Field seuService in edu.url.uniestbackoffice.controllers.api.TableListsController required a bean of type 'edu.url.uniestbackoffice.infraestructura.services.SeuService' 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 'edu.url.uniestbackoffice.infraestructura.services.SeuService' in your configuration.
package edu.url.uniestbackoffice.controllers.api;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import edu.url.uniestbackoffice.controllers.api.dto.DataTableResponse;
import edu.url.uniestbackoffice.infraestructura.services.SeuService;
@RestController
@RequestMapping("/backoffice/api")
public class TableListsController {
@Autowired
SeuService seuService;
@GetMapping("/getseus")
public DataTableResponse getSeus(@RequestBody Object request)
{ DataTableResponse response = new DataTableResponse(); response.setData(seuService.listAllSeus().stream().collect(Collectors.toList())); return response; }
}
package edu.url.uniestbackoffice.infraestructura.services;
import java.util.List;
import org.springframework.stereotype.Service;
import edu.url.uniestbackoffice.entities.Seu;
@Service
public interface SeuService
{ public List<Seu> listAllSeus(); }
Gracias!!