Hibernate4 Struts2 Spring3整合

阅读更多


jdbc.properties 放在src下


jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/webdb
jdbc.username=webdb_admin
jdbc.password=123456


c3p0.acquireIncrement=10
c3p0.initialPoolSize=15
c3p0.minPoolSize=30
c3p0.maxPoolSize=120
c3p0.maxIdleTime=30
c3p0.idleConnectionTestPeriod=30
c3p0.maxStatements=300
c3p0.numHelperThreads=100
c3p0.checkoutTimeout=0
c3p0.validate=true





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"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd" default-autowire="byName" default-lazy-init="true">






  class="com.mchange.v2.c3p0.ComboPooledDataSource"
  destroy-method="close">
 
   ${jdbc.driverClassName}
 

 
   ${jdbc.url}
 

 
   ${jdbc.username}
 

 
   ${jdbc.password}
 

 
   ${c3p0.acquireIncrement}
 

 
   ${c3p0.initialPoolSize}
 

 
   ${c3p0.minPoolSize}
 

 
   ${c3p0.maxPoolSize}
 

 
   ${c3p0.maxIdleTime}
 

 
   ${c3p0.idleConnectionTestPeriod}
 

 
   ${c3p0.maxStatements}
 

 
   ${c3p0.numHelperThreads}
 

 
   ${c3p0.checkoutTimeout}
 






 
 
  
 

 
 
 
 
  
         hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
         hibernate.show_sql=false
         hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
         hibernate.release_mode=auto
         hibernate.connection.isolation=1
         hibernate.cache.use_query_cache=true
         hibernate.cache.use_second_level_cache=true
         hibernate.jdbc.batch_size=25
         hibernate.jdbc.fetch_size=25
  

 

 



  class="org.springframework.orm.hibernate4.HibernateTransactionManager">
     ref="sessionFactory" />






 
  
  
  
  
 










 

 
     expression="execution(public * com.hanhn.*.*.*(..))" /> 
   










webdb

  index.html
  index.htm
  index.jsp
  default.html
  default.htm
  default.jsp





  contextConfigLocation
  /WEB-INF/spring/applicationContext.xml





  org.springframework.web.context.ContextLoaderListener




 
         org.springframework.web.context.request.RequestContextListener
 






  org.springframework.web.util.IntrospectorCleanupListener






  struts2
  org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter




  struts-cleanup
  org.apache.struts2.dispatcher.ActionContextCleanUp



  struts2
  /*
  struts-cleanup
  /*






  EncodingFilter
  org.springframework.web.filter.CharacterEncodingFilter
 
   Encoding
   UTF-8
 





  OpenSessionInViewFilter
  org.springframework.orm.hibernate4.support.OpenSessionInViewFilter




jar包地址:http://www.kuaipan.cn/index.php?ac=file&oid=25394217475907681

你可能感兴趣的:(Hibernate4 Struts2 Spring3整合)