一 详细异常提示
java.lang.IllegalStateException: Configuration error: found multiple declarations of @BootstrapWith for test class [com.xbook.web.controller.CartControllerTest]: [@org.springframework.test.context.BootstrapWith(value=org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTestContextBootstrapper.class), @org.springframework.test.context.BootstrapWith(value=org.springframework.boot.test.context.SpringBootTestContextBootstrapper.class)]
二 解决方法