文件名称:SpringMvc初步入门简单的例子
文件大小:381KB
文件格式:ZIP
更新时间:2014-05-16 12:24:22
SpringMv
package com.ideawu; import org.springframework.web.servlet.mvc.Controller; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * @author ideawu * */ public class HelloController implements Controller { /* * private HelloManager helloManager; * * public void setHelloManager(HelloManager helloManager) { * this.helloManager = helloManager; } */ public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { request.setAttribute("hello_1", "你好啊, Spring!"); request.setAttribute("hello_2", "Hello World!"); return new ModelAndView("hello"); } } 有源码,是入门的比较好的简单例子
【文件预览】:
SpringMvc初步入门简单的例子
----SpringMvc()
--------.project(1KB)
--------.settings()
--------.mymetadata(300B)
--------WebRoot()
--------.myeclipse()
--------src()
--------.classpath(695B)