Olá, implementei a parte do cancelamento de consultas, mas estou recebendo este erro, alguém poderia me ajudar, por favor?
2023-07-03T15:16:25.319-03:00 WARN 3384 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'consultaController': Unsatisfied dependency expressed through field 'agenda': Error creating bean with name 'agendaDeConsultas': Unsatisfied dependency expressed through field 'medicoRepository': Error creating bean with name 'medicoRepository' defined in med.voll.api.domain.medico.MedicoRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Could not create query for public abstract java.lang.Boolean med.voll.api.domain.medico.MedicoRepository.findAtivoById(java.lang.Long); Reason: Using named parameters for method public abstract java.lang.Boolean med.voll.api.domain.medico.MedicoRepository.findAtivoById(java.lang.Long) but parameter 'Optional[id]' not found in annotated query '
select m from Medico m
where
m.ativo = true
and
m.especialidade = :especialidade
and
m.id not in(
select c.medico.id from Consulta c
where
c.data = :data
and
c.motivoCancelamento is null
)
order by rand()
limit 1