springboot 测试依赖包引用解决 status().isOk(), content().string(equalTo("Hello World"))
如下引入三个依赖包:
import static org.hamcrest.Matchers.equalTo;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;