配置applicationcontext.xml文件
来源:互联网 发布:初中女生内衣淘宝 编辑:程序博客网 时间:2024/05/29 08:20
实际上,配置applicationcontext要把其中的东西理解透彻。要注意的地方也有很多。你比如说不同的数据库连接配置不一样。show_sql语句也与hibernate的配置不一样。
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.0.xsd"><bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"><property name="driverClassName" value="com.mysql.jdbc.Driver" /><property name="url" value="jdbc:mysql://localhost:3306/xscj" /><property name="username" value="root" /><property name="password" value="123456" /></bean><bean id="sessionFactory"class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><property name="dataSource"><ref bean="dataSource" /></property><property name="hibernateProperties"><props><prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop><prop key="hibernate.show_sql">true</prop><prop key="hibernate.format_sql">true</prop></props></property><property name="mappingResources"><list><value>org/model/Dlb.hbm.xml</value><value>org/model/Xsb.hbm.xml</value><value>org/model/Kcb.hbm.xml</value><value>org/model/Zyb.hbm.xml</value><value>org/model/Cjb.hbm.xml</value></list></property></bean><bean id="dlDao" class="dao.imp.DlDaoImp"><property name="sessionFactory"><ref bean="sessionFactory" /></property></bean><bean id="xsDao" class="dao.imp.XsDaoImp"><property name="sessionFactory"><ref bean="sessionFactory" /></property></bean><bean id="kcDao" class="dao.imp.KcDaoImp"><property name="sessionFactory"><ref bean="sessionFactory" /></property></bean><bean id="zyDao" class="dao.imp.ZyDaoImp"><property name="sessionFactory"><ref bean="sessionFactory" /></property></bean><bean id="cjDao" class="dao.imp.CjDaoImp"><property name="sessionFactory"><ref bean="sessionFactory" /></property></bean><bean id="dlService" class="service.imp.DlServiceManage"><property name="dlDao"><ref bean="dlDao" /></property></bean><bean id="xsService" class="service.imp.XsServiceManage"><property name="xsDao"><ref bean="xsDao" /></property><property name="cjDao"><ref bean="cjDao" /></property></bean><bean id="zyService" class="service.imp.ZyServiceManage"><property name="zyDao"><ref bean="zyDao" /></property></bean><bean id="kcService" class="service.imp.KcServiceManage"><property name="kcDao"><ref bean="kcDao" /></property></bean><bean id="cjService" class="service.imp.CjServiceManage"><property name="cjDao"><ref bean="cjDao" /></property></bean><bean id="dlAction" class="org.action.DlAction"><property name="dlservice"><ref bean="dlService"/></property></bean><bean id="xsAction" class="org.action.XsAction"><property name="xsService"><ref bean="xsService"/></property><!-- <property name="zyService"><ref bean="zyService"/></property> --></bean><bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"><property name="sessionFactory"><ref local="sessionFactory"/></property></bean><bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"><property name="transactionManager" ref="transactionManager"/><property name="transactionAttributes"><props><prop key="delete*">PROPAGATION_REQUIRED</prop><prop key="*">PROPAGATION_REQUIRED</prop></props></property></bean><bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"><property name="beanNames"><list><value>dlService</value><value>kcService</value><value>cjService</value><value>zyService</value><value>xsService</value></list></property><property name="interceptorNames"><list><value>transactionInterceptor</value></list></property></bean></beans>
- 配置applicationcontext.xml文件
- applicationContext.xml文件配置
- applicationContext.xml文件的配置
- applicationContext.xml文件完整配置
- applicationContext.xml文件完整配置
- 4applicationContext.xml的文件配置
- applicationContext.xml文件配置小结(1)
- SSM框架ApplicationContext.xml文件配置
- applicationContext.xml配置
- applicationContext.xml 配置说明
- applicationContext.xml配置分析
- struts2-applicationContext.xml配置
- applicationContext.xml 配置模板
- applicationContext.xml 配置说明
- applicationContext.xml 配置说明
- spring applicationContext.xml配置
- applicationContext.xml 配置方法
- applicationContext.xml 配置说明
- 杭电 2007
- LightOJ 1030 Discovering Gold + Hdu4405 Aeroplane chess (期望)
- HDU 1017 A Mathematical Curiosity
- 希望大家喜欢http://www.kongbo.net/
- 每日一题(70) - n个筛子的点数
- 配置applicationcontext.xml文件
- Ubuntu—快捷键
- iBatis入门
- 界面层与业务逻辑层分离
- [JS 最简单简洁的插件] 表格排序
- java动态代理(JDK和cglib)
- 关于Linux图形和字符界面切换方式和startx的个人理解
- ECAT_StateChange——EtherCAT状态转换
- 其他_postgreSQL相关