資源簡(jiǎn)介
spring+mybatis 企業(yè)應(yīng)用實(shí)戰(zhàn)(完整版代碼)
代碼片段和文件信息
package?org.fkit.controller;
import?org.apache.commons.logging.Log;
import?org.apache.commons.logging.LogFactory;
import?org.springframework.stereotype.Controller;
import?org.springframework.web.bind.annotation.RequestMapping;
import?org.springframework.web.servlet.ModelAndView;
/**???
?*?@Description:?
?*?
網(wǎng)站:瘋狂Java?
?*?@author?肖文吉 36750064@qq.com???
?*?@version?V1.0???
?*/
/**
?*??HelloController是一個(gè)基于注解的控制器
?*??可以同時(shí)處理多個(gè)請(qǐng)求動(dòng)作,并且無(wú)須實(shí)現(xiàn)任何接口。
?*??org.springframework.stereotype.Controller注解用于指示該類是一個(gè)控制器
?*/
@Controller
public?class?HelloController{
?private?static?final?Log?logger?=?LogFactory
????????????.getLog(HelloController.class);
?
?/**
??*?org.springframework.web.bind.annotation.RequestMapping注解
??*?用來(lái)映射請(qǐng)求的的URL和請(qǐng)求的方法等。本例用來(lái)映射“/hello“
??*?hello只是一個(gè)普通方法。
??*?該方法返回一個(gè)包含視圖路徑或視圖路徑和模型的ModelAndView對(duì)象。
??*?*/
?@RequestMapping(value=“/hello“)
?public?ModelAndView?hello(){
?logger.info(“hello方法?被調(diào)用“);
?//?創(chuàng)建準(zhǔn)備返回的ModelAndView對(duì)象,該對(duì)象通常包含了返回視圖的路徑、模型的名稱以及模型對(duì)象
?ModelAndView?mv?=?new?ModelAndView();
?//添加模型數(shù)據(jù)?可以是任意的POJO對(duì)象??
?????mv.addobject(“message“?“Hello?World!“);??
?????//?設(shè)置邏輯視圖名,視圖解析器會(huì)根據(jù)該名字解析到具體的視圖頁(yè)面??
?????mv.setViewName(“/WEB-INF/content/welcome.jsp“);?
//?返回ModelAndView對(duì)象。
return?mv;
?}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????845??2015-08-13?16:02??04\CheckboxesTest\.classpath
?????文件???????1047??2015-12-21?15:12??04\CheckboxesTest\.project
?????文件????????503??2015-08-13?16:02??04\CheckboxesTest\.settings\.jsdtscope
?????文件????????364??2015-08-13?16:02??04\CheckboxesTest\.settings\org.eclipse.jdt.core.prefs
?????文件????????498??2015-12-21?15:12??04\CheckboxesTest\.settings\org.eclipse.wst.common.component
?????文件????????345??2015-08-13?16:02??04\CheckboxesTest\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2015-08-13?16:02??04\CheckboxesTest\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2015-08-13?16:02??04\CheckboxesTest\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件???????2822??2016-07-28?16:44??04\CheckboxesTest\build\classes\org\fkit\controller\UserController.class
?????文件????????916??2016-07-28?16:44??04\CheckboxesTest\build\classes\org\fkit\domain\Dept.class
?????文件????????741??2016-07-28?16:44??04\CheckboxesTest\build\classes\org\fkit\domain\Employee.class
?????文件????????755??2016-07-28?16:44??04\CheckboxesTest\build\classes\org\fkit\domain\User.class
?????文件???????3270??2016-07-28?16:44??04\CheckboxesTest\src\org\fkit\controller\UserController.java
?????文件????????671??2016-07-28?16:44??04\CheckboxesTest\src\org\fkit\domain\Dept.java
?????文件????????408??2016-07-28?16:44??04\CheckboxesTest\src\org\fkit\domain\Employee.java
?????文件????????545??2016-07-28?16:44??04\CheckboxesTest\src\org\fkit\domain\User.java
?????文件?????????39??2015-08-13?16:02??04\CheckboxesTest\WebContent\me
?????文件????????695??2015-12-21?15:40??04\CheckboxesTest\WebContent\WEB-INF\content\checkboxesForm.jsp
?????文件????????695??2015-12-21?15:58??04\CheckboxesTest\WebContent\WEB-INF\content\checkboxesForm2.jsp
?????文件????????735??2015-12-21?16:41??04\CheckboxesTest\WebContent\WEB-INF\content\checkboxesForm3.jsp
?????文件???????1354??2015-09-12?14:54??04\CheckboxesTest\WebContent\WEB-INF\springmvc-config.xm
?????文件???????1343??2016-03-19?17:12??04\CheckboxesTest\WebContent\WEB-INF\web.xm
?????文件????????845??2015-08-13?16:02??04\CheckboxTest\.classpath
?????文件???????1045??2015-12-21?11:19??04\CheckboxTest\.project
?????文件????????503??2015-08-13?16:02??04\CheckboxTest\.settings\.jsdtscope
?????文件????????364??2015-08-13?16:02??04\CheckboxTest\.settings\org.eclipse.jdt.core.prefs
?????文件????????496??2015-12-21?11:20??04\CheckboxTest\.settings\org.eclipse.wst.common.component
?????文件????????345??2015-08-13?16:02??04\CheckboxTest\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2015-08-13?16:02??04\CheckboxTest\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2015-08-13?16:02??04\CheckboxTest\.settings\org.eclipse.wst.jsdt.ui.superType.name
............此處省略3654個(gè)文件信息
評(píng)論
共有 條評(píng)論