我的控制器
@RequestMapping(value = {"/Management/{code}"}, method = RequestMethod.GET)
public ModelAndView index(@PathVariable("code") String code){
MyDAO dao = new MyDAO();
List<Entity> list = dao.list(code);
ModelAndView view = new ModelAndView();
view.setViewName("myView");
view.addObject("list", list);
return view;
}
我的dispatcher.xml
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" >
<property name="prefix" value="/WEB-INF/pages/"/>
<property name="suffix" value=".jsp"/>
</bean>
然后我打电话
/Management/ExampleCode
页面说我
HTTP Status 404 - /WEB-INF/pages/Management/ExampleCode.jsp
问题是我想要返回myView.jsp而不是/Management/ExampleCode.jsp
任何人都可以帮助我吗?