- 博客(13)
- 收藏
- 关注
原创 下载功能
//下载用户附件 @RequestMapping("/download") public String download(HttpServletRequest request,HttpServletResponse response) throws IOException{ //获取附件id String fi
2017-10-13 09:20:27 213
原创 导出设置
@RequestMapping("/open") public String open(ElecExportFields elecExportFields,HttpServletRequest request){ //查出设置导出表的内容 String belongTo = elecExportFields.getBelongTo();
2017-10-13 09:13:44 317
原创 多条件模糊查询
@Override public List findByConditionNoPage(String ss, final Object[] array,Map oderMap) { String sql=" from "+Tutil.getTClass(this.getClass()).getSimpleName()+" t where 1=1";
2017-10-13 08:40:36 627
原创 spring解决hibernate懒加载的问题
在web容器里面添加以下代码添加spring解决hibernate懒加载的问题,过滤器 该过滤器一定要放置到struts2过滤器的前面原理:延迟了Session的关闭时间,在页面上关闭-->OpenSessionInViewFilterorg.springframework.orm.hibernate3.support.OpenSessionInViewFilt
2017-10-09 10:57:16 520
原创 cookie保存用户名和密码
private void getUser(String path, HttpServletRequest req) { // TODO Auto-generated method stub if(path!=null&&path.contains("/index.jsp")||path.contains("logout.do")){ S
2017-09-27 08:32:14 985
原创 spring的一些配置
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.sprin
2017-09-26 08:59:43 215
原创 struts中的一些常用配置
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> -->
2017-09-26 08:56:30 237
原创 三大框架整合struts+spring+mybatis
action层package com.action;import java.util.List;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.apache.commons.lang3.StringUtils;
2017-09-26 08:39:52 458
原创 三大框架整合struts+spring+hibernate
action层package com.action;import java.util.List;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import javax.ws.rs.DELETE;import org.apac
2017-09-26 08:33:24 382
原创 三大框架多条件查询
@Override public List findByCondition(ElecUser user) { // TODO Auto-generated method stub StringBuffer ss=new StringBuffer(); List plist=new ArrayList(); //姓名
2017-09-25 08:02:26 377
原创 MD5加密
//创建md5加密 private void md5(ElecUser elecUser) { // TODO Auto-generated method stub //原始密码 String logonPwd=elecUser.getLogonPwd(); //如果用户没有填写密码,给一个默认的123
2017-09-25 08:00:59 164
原创 java的上传与下载
文件的上传 public static String up(File upfile, String uploadContentType, String uploadFileName) {// 1:将上传的文件统一放置到upload的文件夹下 String realPath = ServletActionContext.
2017-09-25 07:54:16 241
原创 java中的ajax的二级联动和验证用户名是否存在
后台中的代码//ajax二级联动,根据所属单位,显示单位名称 public void findByJctID() { String jctID = request.getParameter("jctID"); List slist = elecSystemDDLService.findSystemDDLByKeyword(jctID);
2017-09-23 09:50:12 563
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人