SpringBoot Junit 测试
如果当你 Junit 测试的时候报这个错,就要看过来了
java.lang.NoClassDefFoundError: org/springframework/core/annotation/MergedAnnotations$SearchStrategy
Caused by: java.lang.ClassNotFoundException: org.springframework.core.annotation.MergedAnnotations$SearchStrategy
解决办法:检查Spring-test的版本是否跟parent依赖版本保持一致
一般情况都是因为这个原因,版本不一致,导致不兼容。