更新时间:2022-10-31 16:50:14
您命名为TestController
的类中的代码不是控制器,它是一个测试,但是约定表示它是控制器(可能在测试中使用) ).默认情况下,Surefire将寻找与*Test
匹配的测试;将类重命名为ControllerTest
.
The code in the class you named TestController
isn't a controller, it's a test, but the convention says that it's a controller (perhaps used in testing). By default, Surefire will be looking for tests matching *Test
; rename the class to ControllerTest
.