项目中出现specify @BootstrapWith‘s ‘value‘ attribute or make the default bootstrapper class avail

问题描述:在启动项目的时候控制台中报以下错误

specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.

解决方法:引入的test的依赖版本与项目中的Spring版本不一致,一种方法时去除版本指定,另外一种是将版本更改为与项目Spring一致

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-test</artifactId>
    <version>5.1.5.RELEASE</version>
</dependency>

猜你喜欢

转载自blog.csdn.net/y_bccl27/article/details/111885505
今日推荐