1.spring过滤的url-pattern设置成了/,所以这里随便给个新的后缀
index.zl
2.新增一个过滤/index.zl
springmvc org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath:applicationContext.xml 1 springmvc /index.zl springmvc /
3.controller
@Controller@Scope("prototype")@RequestMapping("/index.zl")public class IndexController { @Autowired IndexService indexService; @RequestMapping() public ModelAndView index(HttpServletRequest request, HttpServletResponse response) throws Exception { ModelAndView mv=new ModelAndView(); return mv; }}