Issue
I have a problem about defining baserepositorytest class for annotation extending from another class.
Here is the base repository test shown below.
@DataJpaTest
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE)
@RunWith(SpringRunner.class)
public abstract class BaseRepositoryTests {
}
Here is the repository test shown below.
public class BookRepositoryTests extends BaseRepositoryTests {
}
I got this error shown below.
java.lang.IllegalStateException: Failed to load ApplicationContext
How can I fix it?
Solution
Here is the solution shown below.
After clicking "invalidate caches" and restarting the Intellij IDEA, the issue disappeared.
Answered By - S.N
Answer Checked By - Mary Flores (JavaFixing Volunteer)