spring boot junit测试的时候报错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/fygkchina/article/details/84063827
今日推荐