Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]

1 报错描述

java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.



2分析原因

spring-webmvc的版本应该与spring-test的版本不一致


3解决