@user6845744's answer is the correct one:
"Naming a class like the annotation above is so bad and cause Spring to not recognize it".
This is wrong!
@RestController
public class RestController{ }
This is OK!
@RestController
public class BaseController{ }