1 报错描述
java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.
![Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]_spring](https://file.cfanz.cn/uploads/png/2022/03/30/9/14J4L1Ea6a.png)
2分析原因
spring-webmvc的版本应该与spring-test的版本不一致
![Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]_java_03](https://file.cfanz.cn/uploads/png/2022/03/30/9/G6EebI8K41.png)
3解决
![Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]_spring_05](https://file.cfanz.cn/uploads/png/2022/03/30/9/Oe316465fH.png)
![Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]_spring_07](https://file.cfanz.cn/uploads/png/2022/03/30/9/56P82050XV.png)
梅花香自古寒来
Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]
阅读 59
2022-03-30
1 报错描述
java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.
![Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]_spring](https://file.cfanz.cn/uploads/png/2022/03/30/9/14J4L1Ea6a.png)
2分析原因
spring-webmvc的版本应该与spring-test的版本不一致
![Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]_java_03](https://file.cfanz.cn/uploads/png/2022/03/30/9/G6EebI8K41.png)
3解决
![Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]_spring_05](https://file.cfanz.cn/uploads/png/2022/03/30/9/Oe316465fH.png)
![Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]_spring_07](https://file.cfanz.cn/uploads/png/2022/03/30/9/56P82050XV.png)
梅花香自古寒来
相关推荐
精彩评论(0)