Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

[Bug] Seguinte Erro, ao tentar colocar o DELETE nos pacientes

Aparece o seguinte erro apos eu adicionar os metodos PUT e DELETE conforme foi mostrado no curso de Spring Boot:

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2023-05-15T12:27:07.743-03:00 ERROR 8568 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pacienteController': Unsatisfied dependency expressed through field 'repository': Error creating bean with name 'pacienteRepository' defined in med.voll.api.paciente.PacienteRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Could not create query for public abstract org.springframework.data.domain.Page med.voll.api.paciente.PacienteRepository.findAllAtivoTrue(org.springframework.data.domain.Pageable); Reason: Failed to create query for method public abstract org.springframework.data.domain.Page med.voll.api.paciente.PacienteRepository.findAllAtivoTrue(org.springframework.data.domain.Pageable); No property 'findAllAtivo' found for type 'Paciente'

1 resposta
solução!

Oi Emerson!

Pelo erro o problema está na sua interface PacienteRepository: No property 'findAllAtivo' found for type 'Paciente'.

Acho que seu método está com o nome errado: findAllAtivo. Deveria ser findAllByAtivo