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]_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)

0 0 举报