Could not load TestContextBootstrapper - Spring Unit testing

后端 未结 3 1673
终归单人心
终归单人心 2020-12-11 00:40

I have to execute Unit test on one of my Dao classes using Spring. Here is my unit test:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locati         


        
3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-11 01:12

    In my case it was a version conflict caused by activemq-all. That dependency (5.12.2 in my case) includes an incompatible version of spring (I just upgraded to spring 4.3.4). So, save yourself a few hours of debugging and check not only the Dependency Hierarchy in your favorite IDE, but also look inside those jar files to see if any are embedding org.springframework packages.

提交回复
热议问题