0
点赞
收藏
分享

微信扫一扫

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

kmoon_b426 2022-03-30 阅读 56


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]_springSpring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]_java_02


2分析原因

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

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

3解决

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

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

 

梅花香自古寒来


举报

相关推荐

0 条评论