MockServerContainer does not support addEndpoint

在编写junit测试spring boot项目的时候报错MockServerContainer does not support addEndpoint
然自己在@SpringBootTest中加上SpringBootTest.WebEnvironment.RANDOM_PORT成功解决错误:
@RunWith(SpringRunner.class)
@SpringBootTest(classes = FieldApplication.class,webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)

猜你喜欢

转载自blog.csdn.net/liu_12345_liu/article/details/80978293