I just wanted to share this issue during the call, but I couldn’t because my computer had some sound issues.
But the actual problem is here:
In configuration, we register the packages to scan in this way:
From there, test cases on different modules such as patient, person, patientType, and test run smoothly because they are depending on internal dependencies.
But when it comes to other modules such organization which depends on external libraries, it becomes a great challenge because the OrganizationImportService under the organization package contains an FhirContext dependency, which is an external library. The fact that it’s an external library leads to dependency injection failure during tests execution, and the error below is thrown.
`Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘ca.uhn.fhir.context.FhirContext’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
can someone guide to know where that ca.uhn.fhir.context.FhirContext is configured?`
Anyone to help !