背景
今天测试controller时突然报错
主要是以下这一句
Error creating bean with name 'serverEndpointExporter' defined in class path resource
解决方案
在Test类的@SpringBootTest注解后加上
(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
即变成
今天测试controller时突然报错
主要是以下这一句
Error creating bean with name 'serverEndpointExporter' defined in class path resource
在Test类的@SpringBootTest注解后加上
(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
即变成