I have the following test class:
@ActiveProfiles({ \"DataTC\", \"test\" })
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {BaseTestC
It seems like you are missing
@WebAppConfiguration
from your test class.
The documentation states
The resource base path is used behind the scenes to create a MockServletContext which serves as the ServletContext for the test’s WebApplicationContext.
Typically a Servlet container would provide the ServletContext. Since you are in a testing environment, you need a fake. @WebAppConfiguration provides that.