springboot
define an interface
public interface HelloController {
@RequestMapping("/hello")
String hello();
}
then implement
@ RestController
public class HelloControllerImpl implements HelloController {
@Override
public String hello(){
return "hello";
}
}
@ RequestMapping should not be inherited by the method in HelloControllerImpl. How does it work?