摘要: 配置Hibernate二级缓存步骤: 加入二级缓存的jar包及配置文件 jar包位置:hibernate-release-4.1.8.Final\lib\optional\ehcache下所有jar包 加入ehcache.xml文件,位置:hibernate-release-4.1.8.Final\ 阅读全文
posted @ 2016-06-18 15:43 hellolcc 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 1. 单项多对一映射 custom(顾客)与order(订单) :一个顾客可以有多个订单,一个订单只能有一个顾客 配置方法:在多的一端配置<many -to one> 执行save操作时,1 先插入1的一端,再插入n的一端,只有insert语句 2 先插入n的一端,再插入1的一端,会多出update 阅读全文
posted @ 2016-06-14 16:17 hellolcc 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1. jar包 hibernate-release-4.1.8.Final\lib\optional\c3p0 2. 加入配置: <!-- 数据库连接池最大连接数 --> <property name="c3p0.max_size">30</property> <!-- 数据库连接池最小连接数 -- 阅读全文
posted @ 2016-06-14 14:32 hellolcc 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1. 执行get方法:会立即加载对象 而执行load方法,若不适用该对象,则不会立即执行查询操作,而返回一个代理对象 get立即检索,load延迟检索 2. load方法可能抛出懒加载异常:LazyInitializationException 在需要初始化代理对象之前,已经关闭了Session 3 阅读全文
posted @ 2016-06-14 14:06 hellolcc 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 文章转载于wanglihu的博客,原文链接http://wanglihu.iteye.com/blog/1897718 1.java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor缺少asm-3.3.jar2.java.lang.N 阅读全文
posted @ 2016-06-13 15:42 hellolcc 阅读(275) 评论(0) 推荐(0) 编辑
摘要: jar包 配置文件 web.xml文件 applicationContext.xml db.properties hibernate.cfg.xml applicationContext-beans.xml struts.xml 有两个jar包需要注意 阅读全文
posted @ 2016-06-13 15:30 hellolcc 阅读(252) 评论(0) 推荐(0) 编辑
摘要: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [resource/applicati 阅读全文
posted @ 2016-06-12 16:35 hellolcc 阅读(249) 评论(0) 推荐(0) 编辑