Olá.
Após adicionarmos várias classes de regras de negócio, o código não compila. Pelo que entendi, o erro está na query para buscar um médico aleatório.
Segue print da query:
Segue exception lançada:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'appointmentController': Unsatisfied dependency expressed through field 'appointmentSchedule': Error creating bean with name 'appointmentSchedule': Unsatisfied dependency expressed through field 'doctorRepository': Error creating bean with name 'doctorRepository' defined in med.voll.api.domain.doctor.DoctorRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Could not create query for public abstract med.voll.api.domain.doctor.Doctor med.voll.api.domain.doctor.DoctorRepository.chooseRandomDoctor(med.voll.api.domain.doctor.Speciality,java.time.LocalDateTime); Reason: Validation failed for query for method public abstract med.voll.api.domain.doctor.Doctor med.voll.api.domain.doctor.DoctorRepository.chooseRandomDoctor(med.voll.api.domain.doctor.Speciality,java.time.LocalDateTime)