摘要: 1.hibernate的配置 root root com.mysql.jdbc.Driver jdbc:mysql:///hibernate org.hibernate.dialec... 阅读全文
posted @ 2016-01-12 00:43 fengyexjtu 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Insert title here eleven ... 阅读全文
posted @ 2016-01-12 00:09 fengyexjtu 阅读(256) 评论(0) 推荐(0) 编辑
摘要: ##自定义的注解有四个注意的内容:* Target @Target(ElementType.TYPE) // 注解可以使用的位置* Retention @Retention(RetentionPolicy.RUNTIME)// 生命周期 * Documented @Docu... 阅读全文
posted @ 2016-01-11 23:29 fengyexjtu 阅读(210) 评论(0) 推荐(0) 编辑
摘要: mappingResources用于指定少量的hibernate配置文件像这样 WEB-INF/conf/hibernate/cat.hbm. WEB-INF/conf/hibernate/dog.hbm. . mappingDirectoryLocations... 阅读全文
posted @ 2015-12-16 00:37 fengyexjtu 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-12-12 22:41 fengyexjtu 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 配置:1 2 com.googlecode.genericdao3 dao-hibernate4 1.2.05 使用:1.BaseDaopublic class BaseDAO extends G... 阅读全文
posted @ 2015-12-11 21:48 fengyexjtu 阅读(409) 评论(0) 推荐(0) 编辑
摘要: 当需要特定类型的参数时,需要类型转换.在某些情况下,要使用ModelDriven和Preparable接口,情况又有发生不同.struts2中的Action实现了ModelDriven和Preparable接口,Action的属性就要写明gett/sett方法,否则仍然不能转换成功类型转换的配置也分... 阅读全文
posted @ 2015-07-07 12:46 fengyexjtu 阅读(512) 评论(0) 推荐(0) 编辑
摘要: hibernate的版本更新很快,获取sessionFactory的方式也在变化1.通用的方式:public SessionFactory test1(){ Configuration cfg = new Configuration().configure("hibernate.cfg... 阅读全文
posted @ 2015-06-21 21:03 fengyexjtu 阅读(526) 评论(0) 推荐(0) 编辑
摘要: mvn appfuse:gen -Dentity=Name为POJO生成CRUD。Name的值默认是${groupId}.model.Name。自定义包路径:-Dentity=com.myproject.subpackage.model.Name 或者-Dentity=~.subpackage.mo... 阅读全文
posted @ 2015-01-17 05:29 fengyexjtu 阅读(265) 评论(0) 推荐(0) 编辑