摘要:
1、定义拦截器,继承MethodFilterInterceptorpackage com.life.stuts.interceptor;import java.util.Map;import com.opensymphony.xwork2.ActionInvocation;import com.op... 阅读全文
摘要:
1、Dao层接口package com.life.dao;import java.util.List;import java.util.Map;import org.hibernate.Query;public interface IDao { /** * 根据id查找实体 *... 阅读全文
摘要:
删除:1、org.springframework.dao.DataIntegrityViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`life`.`tb_ad`, CO... 阅读全文
摘要:
1、HQL分页显示firstResult是从第几条开始(索引从0开始计数)maxResults表示记录的条数,而不是到第几条数据Query query = getQuery(hql, params);List list = query.setFirstResult(firstResult) ... 阅读全文
摘要:
1、root登录mysql之后,查看端口,确认是3306show variables like 'port';2、添加root@%用户并设置密码为123456GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "123456";如果出现这样的错... 阅读全文
摘要:
1、obj.getList().add( t )就可以了,当然set也可以,obj.getList().addAll(list)也可以 阅读全文
摘要:
1、action.classprivate File pictureType; private String pictureTypeContentType; private String pictureTypeFileName;public String editType() throw... 阅读全文
摘要:
1、ServletActionContext.getServletContext().getRealPath("/")得到:C:\Users\JL\Workspaces\.metadata\.me_tcat\webapps\HuiLife\ServletActionContext.getServle... 阅读全文
摘要:
1 Object[] params={store==null?null:store.getId()};Done 阅读全文
摘要:
1、惠生活管理系统 客户端API 2‘提交action之后赋相应值session、request... 阅读全文