摘要:/** * 缓存池 * @author xiaoquan * @create 2015年3月13日 上午10:32:13 * @see */ public class CachePool { private static CachePool instance;//缓存池唯一实例 private st
阅读全文
01 2016 档案
摘要:/** * 缓存池 * @author xiaoquan * @create 2015年3月13日 上午10:32:13 * @see */ public class CachePool { private static CachePool instance;//缓存池唯一实例 private st
阅读全文
摘要:在配置文件中加入 <prop key="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory</prop> 加入之后不能更新删除,不加不能使用代参查询(好烦躁,有
阅读全文
摘要:package md5;import java.security.MessageDigest;import java.security.NoSuchAlgorithmException;/* * MD5 算法*/public class MD5 { // 全局数组 private...
阅读全文
摘要:在 new bean()中,对象里要有其构造方法,查询参数必须是构造方法中的参数,get set也要同步 类似于 String hql= "select new A(a.id, a.name, a.pass, a.bid,b.name) from A a,B b where a.bid=b.
阅读全文
摘要:解决办法:在属性的get方法上加上一段注解标识它是临时属性,不是数据库字段就OK@Transientpublic List getChildList() {return childList;}public void setChildList(List childList) {this.childLi...
阅读全文
摘要:@Repositorypublic class BaseDao extends HibernateDaoSupport{ protected Class objectClass; protected String className; protected String alias...
阅读全文
摘要:因为类首先被Spring实例化的时候,会调用构造函数。只有实例化后,才会注入。你等于没注入就调用了,所以报错。
阅读全文
摘要:因为类首先被Spring实例化的时候,会调用构造函数。只有实例化后,才会注入。你等于没注入就调用了,所以报错。把DAO实现类注入到service实现类中,把service的接口(注意不要是service的实现类)注入到action中,注入时不要new 这个注入的类,因为spring会自动注入,如果手...
阅读全文
|