No tests found matching 【junit 异常】

今天在配置完Spring data JPA环境后,想做一个简单的单元测试,但出现了一个奇怪的错误。

错误大致如下:
java.lang.Exceptipn No tests found matching [ExactMatcher:fDisplayNametes (ExactMatcher:fDisplayametestcm.s LeadingldentifierMaterlasm =com.peng.test.Test01fLeadingdentifst from [email protected]
截图:

No tests found matching 【junit 异常】
原因:这是因为Spring和Junit版本不兼容的问题。
一开始我spring版本是4.2.4的,用的junit包为junit 4.12.jar。
然后,我将junit包换成了junit 4.9.jar,问题就解决了!