SpringJUnit4ClassRunner class not found

前端 未结 7 796
长发绾君心
长发绾君心 2021-01-07 18:16

i am trying to create a unit test using SpringJUnit4ClassRunner but everytime i execute the test it says it cannot find SpringJUnit4ClassRunner using mvn install.

         


        
相关标签:
7条回答
  • 2021-01-07 18:58

    I downloaded your code and got it working locally, as long as I included the relevant import statements:

    import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
    import org.junit.runner.RunWith;
    import org.junit.Test;
    ...
    

    Perhaps you're missing an import somewhere.

    0 讨论(0)
提交回复
热议问题