我从Spring Portlet MVC开始,但我相信这个问题也适用于Spring MVC。让我向您展示这个示例
@Controller
@RequestMapping(value="VIEW")//this maps to Portlet Mode VIEW
public class LoginController {
@RenderMapping("action=showRegisterPage")
//this annotation is almost the same like @RequestMapping
public St
我正在尝试开发一个spring MVC项目,它的视图是一个index.jsp文件。我搜索了一下,发现我应该通过下面两个配置类来做这件事:
public class MainInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
public static HashMap<String, String> response_code = new HashMap<String, String>();
@Override
protected Class<