在web.xml中配置SpringMVC拦截路径并指定SpringMVC.xml的位置 不指定的话默认为:servlet.xml在applicationContext.xml中加入引用在SpringMVC.xml中加入相同的引用 加入Spring注解驱动 加入Controller的包指定SpringMVC.xml的视图解析器 返回前缀 后缀