Chinaunix首页 | 论坛 | 博客
  • 博客访问: 783920
  • 博文数量: 738
  • 博客积分: 7000
  • 博客等级: 少将
  • 技术积分: 5000
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-12 09:00
文章分类

全部博文(738)

文章存档

2011年(1)

2008年(737)

我的朋友

分类:

2008-09-12 09:02:22

    一、测试类和配置文件的目录结构
        test
                bbs.spring.common.test
                    BaseTransactionalIntegrationTests
                    applicationContext.xml
                bbs.spring.service.test
                    TopicServiceImplTest
                    applicationContext-test.xml

    二、applicationContext.xml配置
    配置数据源、事务和依赖注入,暴露带事务的业务接口。
    Xml代码
    ......

   

       

            class="org.springframework.orm.hibernate3.HibernateTemplate">

           

       

       

       

            class="org.springframework.orm.hibernate3.HibernateTransactionManager">

           

               

           

       

       

       

            class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">

           

           

           

               

                    PROPAGATION_REQUIRED

               

           

       

       

       

            class="org.eesite.bbs.hibernate.dao.TopicDaoImpl">

           

       

       

       

            class="org.eesite.bbs.spring.service.TopicServiceImpl">

           

       

       

       

           

           

               

                   

                        org.eesite.bbs.spring.service.ITopicService

                   

               

           

           

               

           

       
    ......

   

       

            class="org.springframework.orm.hibernate3.HibernateTemplate">

           

       

       

       

            class="org.springframework.orm.hibernate3.HibernateTransactionManager">

           

               

           

       

       

       

            class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">

           

           

           

               

                    PROPAGATION_REQUIRED

               

           

       

       

       

            class="org.eesite.bbs.hibernate.dao.TopicDaoImpl">

           

       

       

       

            class="org.eesite.bbs.spring.service.TopicServiceImpl">

           

 

[1]   

【责编:landy】

--------------------next---------------------

阅读(266) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~