spring--注入hibernate

来源:百度文库 编辑:神马文学网 时间:2024/04/29 21:10:44

一:applicationContext.xml:(spring与Hibernate的整合)

http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
 xmlns:tx="
http://www.springframework.org/schema/tx"
 xmlns:aop="
http://www.springframework.org/schema/aop"
 xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
              http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
              
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
 
 
 
 
 
   class="org.apache.commons.dbcp.BasicDataSource">
     value="oracle.jdbc.driver.OracleDriver">
  

     value="jdbc:oracle:thin:@200.200.200.144:1521:orcl">
  

  
  
 

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

  
   
    org.hibernate.dialect.Oracle10gDialect
   
   
  

     
   
          com/kmwh/core/pojo/VoteTheme.hbm.xml
        

  
  
 

 
 
  
 

 
   
      
    
  
      
      
         PROPAGATION_REQUIRED  
         PROPAGATION_REQUIRED  
       PROPAGATION_REQUIRED