Spring与Hibernate的整合applicationContext.xml中配置

1、资源文件resources.properties中内容

hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
hibernate.hbm2ddl.auto=none
hibernate.show_sql=true
hibernate.query.substitutions=true 1, false 0
hibernate.default_batch_fetch_size=16
hibernate.max_fetch_depth=2
hibernate.bytecode.use_reflection_optimizer=true
hibernate.cache.use_second_level_cache=true
hibernate.cache.use_query_cache=true
hibernate.cache.region.factory_class=org.hibernate.cache.EhCacheRegionFactory
net.sf.ehcache.configurationResourceName=/ehcache_hibernate.xml
hibernate.cache.use_structured_entries=true
hibernate.generate_statistics=true


connection.driver_class=com.mysql.jdbc.Driver
connection.url=jdbc\:mysql\://192.168.1.27\:3320/emcc_db?useUnicode\=true&characterEncoding\=UTF-8
connection.username=root
connection.password=123456

proxool.maximum.connection.count=10
proxool.minimum.connection.count=5
proxool.statistics=1m,15m,1h,1d
proxool.simultaneous.build.throttle=30
name=admin
password=admin

2、applicationContext.xml中配置



      




 
















com/zby/dasic/user/model/UserModel.hbm.xml
com/zby/dasic/evaluation/model/EvaluateItem.hbm.xml
com/zby/dasic/evaluation/model/EvaluateItemDetail.hbm.xml
com/zby/contest/awards/model/Awards.hbm.xml
com/zby/contest/awardscoures/model/AwardsCourse.hbm.xml
com/zby/contest/comment/model/Comment.hbm.xml
com/zby/contest/course/model/Course.hbm.xml
com/zby/contest/coursetype/model/CourseCategory.hbm.xml
com/zby/contest/evaluate/model/Evaluate.hbm.xml
com/zby/contest/events/model/Events.hbm.xml
com/zby/contest/schedule/model/Schedule.hbm.xml
com/zby/contest/schedulecoures/model/ScheduleCourse.hbm.xml
com/zby/info/news/model/News.hbm.xml






${hibernate.dialect}
${hibernate.show_sql}
true
${hibernate.query.substitutions}
${hibernate.default_batch_fetch_size}
${hibernate.max_fetch_depth}
${hibernate.generate_statistics}
${hibernate.bytecode.use_reflection_optimizer}






 
  
 
   
  

你可能感兴趣的:(Hibernate,Spring)