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
.