Chinaunix首页 | 论坛 | 博客
  • 博客访问: 382332
  • 博文数量: 80
  • 博客积分: 2682
  • 博客等级: 少校
  • 技术积分: 907
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-16 09:55
文章分类

全部博文(80)

文章存档

2012年(80)

分类: 系统运维

2012-12-12 15:54:03

一:用连接池实现(配置一)
     
           com.mysql.jdbc.Driver
       
       
           jdbc:mysql://localhost/tfdbstruts
       
       
           root
       
        
           123
       
 
     
 
 
           
               com/tfsoftware/tfww/model/Employee.hbm.xml
           
 
   
           
               org.hibernate.dialect.MySQLDialect             
               true                
               
                             
           
       

二:用连接池实现(配置二)    .properties  属性文件 
   
   
      ccmcms.properties
     
 
 
   
       
           ${hibernate.connection.driver_class}
       
       
           ${hibernate.connection.url}
       
       
           ${hibernate.connection.username}
       
       
           ${hibernate.connection.password}
       
     


D:\workspace\MyEclipse\test\WebRoot\WEB-INF\classes 包下
ccmcms.properties   
#    MySql数据库 配置文件 
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost/humanResources
hibernate.connection.username=root
hibernate.connection.password=498164
阅读(918) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~