Spring配置文件中关于事务配置总是由三个组成部分,分别是DataSource、TransactionManager和代理机制这三部分,无论哪种配置方式,一般变化的只是代理机制这部分。
DataSource、TransactionManager这两部分只是会根据数据访问方式有所变化,比如使用Hibernate进行数据访问时,DataSource实际为SessionFactory,Transac...
分类:
编程语言 时间:
2015-05-17 12:16:42
阅读次数:
150
MVC 三层架构 层与层之间要解耦和。所用技术: Struts2 + Hibernate + Spring + JBPM +Junit + JQuery 技术选型:要考虑项目需求,人员素质,学习成本等等。开发环境 Windows + Tomcate + Eclipse/MyEclipse +...
分类:
其他好文 时间:
2015-05-17 11:57:14
阅读次数:
103
org.hibernate.dialect.Oracle9Dialect ./Users.hbm.xml ./Orderdts.hbm.xml ./Meal.hbm.xml ./Mea...
分类:
其他好文 时间:
2015-05-16 23:15:58
阅读次数:
135
Hibernate映射文件
1、映射文件结构
2、映射主键
3、映射普通属性
4、映射集合属性
5、集合属性的性能分析
6、有序集合映射
7、映射数据库对象...
分类:
Web程序 时间:
2015-05-16 20:40:19
阅读次数:
159
Hibernate配置文件主要用于配置数据库连接和Hibernate运行时所需的各种属性,这个配置文件应该位于应用程序或Web程序的类文件夹classes中。Hibernate配置文件支持两种形式,一种是xml格式的配置文件,另一种是Java属性文件格式的配置文件,采用“键=值”的形式。建议采用xml格..
分类:
Web程序 时间:
2015-05-16 18:39:58
阅读次数:
336
1、hibernate解析hibernate.cfg.xml文件时出现如下错误。org.hibernate.HibernateException:Couldnotparseconfiguration:/hibernate.cfg.xmlatorg.hibernate.cfg.Configuration.doConfigure(Configuration.java:1542)atorg.hibernate.cfg.Configuration.configure(Configuratio..
分类:
Web程序 时间:
2015-05-16 18:37:10
阅读次数:
116
1、下面这三个包,在hibernate4中已经废弃了,因为都直接用session来进行很好的事务管理import org.springframework.orm.hibernate3.HibernateCallback;import org.springframework.orm.hibernate...
分类:
编程语言 时间:
2015-05-16 16:19:58
阅读次数:
302
1.添加spring支持,包含spring-hibernate和spring-struts2.添加struts支持,包含struts-spring3.添加hibernate支持,在spring配置文件中生成数据源和会话工厂。4.生成实体类和dao类。5.建立biz和action包。6.在biz中引用...
分类:
其他好文 时间:
2015-05-16 13:20:17
阅读次数:
93
Hibernate工作原理及为什么要用?原理:1.通过Configuration().configure();读取并解析hibernate.cfg.xml配置文件2.由hibernate.cfg.xml中的读取并解析映射信息3.通过config.buildSessionFactory();//创建S...
分类:
其他好文 时间:
2015-05-16 11:50:44
阅读次数:
106
1、错误描述
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
Attribute name "aphmodel" associated with an element type "mxg" must be followed by the ' = ' character.
at org.apach...
分类:
其他好文 时间:
2015-05-15 22:52:26
阅读次数:
587