Description: 1.使用struts2+spring3+hibernate3整合实现用户CRUD功能。
2.使用多种配置方式
A.将hibernate从外部导入,使用MySQL作为数据库。
B.将hibernate实体映射集成到spring配置文件中。
3.使用传统的配置文件集成框架。
4.注意以下问题:
A.当使用spring管理struts2的 action时要注意需在struts2的action配置文件中添加
<constant name="struts.objectFactory" value="spring" />,并且需要
将struts2-spring-plugin-2.2.1.jar添加到classpath中去。
B.Demo默认Hibernate的DataSource、HibernateProperties、MappingResources
信息配置到applicationContext.xml文件中。如果使用Hibernate.cfg.xml配置这些
信息,需要在applicationContext.xml文件中将configLocation这个属性去掉注释,
并将其他的property注释或删除。-. To use struts2+spring3+hibernate3 integrated user CRUD functions. 2. Use a variety of configurations A. will hibernate imported from outside, using MySQL as the database. B. hibernate entity mapping integrated into the spring configuration file. 3 using a traditional configuration file integration framework. Note the following question: A. When using spring struts2' s action to pay attention to the need to add in the the struts2 action configuration file <constant name="struts.objectFactory" value="spring" /> And struts2-spring-plugin-2.2.1.jar added to the classpath. The the B.Demo default Hibernate DataSource, HibernateProperties, MappingResources configuration to applicationContext.xml file. If you are using Hibernate.cfg.xml configure these uncomment this attribute in applicationContext.xml file will configLocation, and other property annotation or deleted. Platform: |
Size: 16137216 |
Author:张华 |
Hits:
Description: struts2+hibernate+spring3.0开发的oa系统,开发者突击上的demo-struts2+hibernate+spring3.0 oa system development, developers assault on the demo Platform: |
Size: 267264 |
Author:隋长国 |
Hits: