資源簡介
SpringMVC+ibatis+velocity整合例子,雖然比較簡單。可以為沒有配置好的同學(xué)作為參考。

代碼片段和文件信息
package?demo.controller;
import?java.io.IOException;
import?java.util.List;
import?javax.servlet.ServletException;
import?javax.servlet.http.HttpServletRequest;
import?javax.servlet.http.HttpServletResponse;
import?org.springframework.validation.BindException;
import?org.springframework.web.servlet.ModelAndView;
import?org.springframework.web.servlet.mvc.SimpleFormController;
import?demo.dao.AccountDao;
import?demo.domain.Account;
import?demo.form.LoginForm;
public?class?LoginController?extends?SimpleFormController?{
private?AccountDao?myAccountDao;
protected?ModelAndView?onsubmit(HttpServletRequest?request
HttpServletResponse?response?object?command?BindException?errors)
throws?ServletException?IOException?{
LoginForm?loginForm?=?(LoginForm)?command;
List?accounts?=?myAccountDao.getAccounts();
ModelAndView?modelAndView?=?new?ModelAndView(getSuccessView());
modelAndView.addobject(“name“?loginForm);
modelAndView.addobject(“accounts“?accounts);
return?modelAndView;
}
public?void?setMyAccountDao(AccountDao?myAccountDao)?{
this.myAccountDao?=?myAccountDao;
}
public?AccountDao?getMyAccountDao()?{
return?myAccountDao;
}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????218??2009-03-28?19:51??Velocity\readme.txt
?????文件???????1731??2009-03-28?00:45??Velocity\Tomcat_jdni配置\context.xm
?????文件????????422??2009-03-26?22:21??Velocity\Velocity\.classpath
?????文件???????1041??2009-03-28?16:00??Velocity\Velocity\.project
?????文件????????454??2009-03-06?14:34??Velocity\Velocity\.settings\.jsdtscope
?????文件????????330??2009-03-06?14:34??Velocity\Velocity\.settings\org.eclipse.jdt.core.prefs
?????文件????????217??2009-03-06?14:34??Velocity\Velocity\.settings\org.eclipse.jst.common.project.facet.core.prefs
?????文件????????422??2009-03-06?14:34??Velocity\Velocity\.settings\org.eclipse.wst.common.component
?????文件????????229??2009-03-06?14:34??Velocity\Velocity\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2009-03-06?14:34??Velocity\Velocity\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2009-03-06?14:34??Velocity\Velocity\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件?????????52??2009-03-06?17:08??Velocity\Velocity\readme.txt
?????文件???????1227??2009-03-28?00:57??Velocity\Velocity\src\demo\controller\LoginController.java
?????文件????????143??2009-03-28?00:50??Velocity\Velocity\src\demo\dao\AccountDao.java
?????文件????????428??2009-03-28?00:48??Velocity\Velocity\src\demo\dao\ibatis\maps\Account.xm
?????文件????????387??2009-03-28?00:55??Velocity\Velocity\src\demo\dao\ibatis\SqlMapAccountDao.java
?????文件????????364??2009-03-13?10:06??Velocity\Velocity\src\demo\domain\Account.java
?????文件????????384??2009-03-06?14:42??Velocity\Velocity\src\demo\form\LoginForm.java
?????文件????????361??2009-03-06?14:38??Velocity\Velocity\WebContent\index.jsp
?????文件?????????19??2009-03-06?15:55??Velocity\Velocity\WebContent\index.vm
?????文件?????????39??2009-03-06?14:35??Velocity\Velocity\WebContent\me
?????文件?????????60??2009-03-16?10:10??Velocity\Velocity\WebContent\readme.txt
?????文件???????1041??2009-03-28?15:54??Velocity\Velocity\WebContent\WEB-INF\applicationContext.xm
?????文件???????1876??2009-03-28?00:57??Velocity\Velocity\WebContent\WEB-INF\classes\demo\controller\LoginController.class
?????文件????????217??2009-03-28?00:55??Velocity\Velocity\WebContent\WEB-INF\classes\demo\dao\AccountDao.class
?????文件????????428??2009-03-28?00:48??Velocity\Velocity\WebContent\WEB-INF\classes\demo\dao\ibatis\maps\Account.xm
?????文件????????760??2009-03-28?00:55??Velocity\Velocity\WebContent\WEB-INF\classes\demo\dao\ibatis\SqlMapAccountDao.class
?????文件????????624??2009-03-28?00:55??Velocity\Velocity\WebContent\WEB-INF\classes\demo\domain\Account.class
?????文件????????731??2009-03-28?00:55??Velocity\Velocity\WebContent\WEB-INF\classes\demo\form\LoginForm.class
?????文件???????1439??2009-03-16?09:36??Velocity\Velocity\WebContent\WEB-INF\dataAccessContext.xm
............此處省略47個(gè)文件信息
評(píng)論
共有 條評(píng)論