Boa tarde! Criei a classe FuncionarioDto public class FuncionarioDto { private Integer id; private String nome; private Double salario; //getter e setter //construtor recebendo os atributos na ordem da query } Alterei o repositorio @Query(value = "SELECT f.id, f.nome, f.salario FROM funcionarios f", nativeQuery = true) List findFuncionarioSalarioComProjecaoClasse();
Ao executar o erro é retornado java.lang.IllegalStateException: Failed to execute CommandLineRunner Caused by: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [org.springframework.data.jpa.repository.query.AbstractJpaQuery$TupleConverter$TupleBackedMap] to type [br.com.alura.spring.data.orm.FuncionarioDto]