spring mvc常用的注解: @Controller @Controller 负责注册一个bean 到spring 上下文中,bean 的ID 默认为类名称开头字母小写,你也可以自己指定,如下 方法一: @……