Could not detect default resource locations for test class : class path resource does not exist
The error is related to this part of the logs:
INFO : org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [com.xxxx.api.services.MessageServiceImplIntegrationTest]: class path resource [com/xxxx/api/services/MessageServiceImplIntegrationTest-context.xml] does not existINFO : org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [com.xxxx.api.services.MessageServiceImplIntegrationTest]: MessageServiceImplIntegrationTest does not declare any static, non-private, non-final, inner classes annotated with @Configuration.
Basically, your test class doesn't have a configuration part (either xml or @Configuration
) that it can use to build the application context.
See this link for test configuration with xml and this one for configuration with @Configuration
annotation.