When testing spring boot applications, the @SpringBootTest annotation loads the whole application, but it is often better to limit the application context to just the set of Spring components that participate in the test scenario. This is accomplished by listing them in the annotation declaration.
https://tanzu.vmware.com/developer/guides/spring-boot-testing/