Crear Servicio @Service

Crea interface de ProyectoService

package com.oregoom.web.app.personal.service;
import java.util.List;
import com.oregoom.web.app.personal.models.entity.Project;
public interface IProjectService {
    
    public List<Project> listProjects();
    
    public void save(Project project);
    
    public void delete(Project project);
    
    public Project searchProject(Project project);
}

Ahora implementar el Interface ProjectService

@Service
public class PersonaServiceImpl implements IProjectService{
    @Autowired
    private IProjectDao projectDao;
    
    @Override
    @Transactional(readOnly = true)
    public List<Project> listProjects() {
        return (List<Project>) projectDao.findAll();
    }
    @Override
    @Transactional
    public void save(Project project) {
        projectDao.save(project);
        
    }
    @Override
    @Transactional
    public void delete(Project project) {
        projectDao.delete(project);
        
    }
    @Override
    @Transactional(readOnly = true)
    public Project searchProject(Project project) {
        
        return projectDao.findById(project.getIdProject()).orElse(null);
    }
    
}

El controlador utilizaremos nuestra implementación de service.

@ModelAttribute("projects")
public List<Project> listProject(){
    return projectService.listProjects();
}