- 博客(7)
- 收藏
- 关注
ExportDB
[code="java"]public class ExportDB { public static void main(String[] args) { //读取配置文件hibernate_cfg.xml Configuration cfg = new Configuration().configure(); //创建SchemaExport对象 ...
2008-01-03 20:39:13
243
HibernateUtils
[code="java"]public class HibernateUtils { private static SessionFactory factory; private HibernateUtils() {} static { Configuration cfg = new Configuration().configure(); factory...
2008-01-03 20:38:35
106
pager-taglib记录
jsp文件:[code]................................. 首页 前页 ${pageNumber } ${pageNumber } 后页 尾页 [/code]页面调用offs...
2007-12-16 11:54:42
119
基于spring的junit单元测试
使用Spring进行单元测试,需要spring-mock.jar包测试程序继承AbstractTransactionalSpringContextTests,需要重写getConfigLocations()方法,返回给spring配置文件名称.spring的单元测试会自动回滚数据库,对于结果的判断可以使用assert断言,需要对数据库进行实际的操作需要setComplete()方法.ps:...
2007-12-16 11:40:27
121
hibernate配置文件
hibernate配置文件:hibernate.cfg.xml[code] java:comp/env/jdbc/testdbcp org.hibernate.dialect.MySQLDialect true update [/code]s...
2007-12-15 20:40:44
116
spring配置数据源和hibernate的配置整合成一个文件
spring配置文件applicationContext-common.xml:[code] com.mysql.jdbc.Driver jdbc:mysql://127.0.0.1/sshwithdbcp ...
2007-12-15 20:38:11
156
Tomcat DBCP连接池配置
Tomcat连接池配置a) 下载Tomcat管理界面,参见网址:http://tomcat.apache.org/download-55.cgi#5.5.23b) 将管理界面的zip包解压,例如:apache-tomcat-5.5.23-admin.zip,将解压后的server/webapps/admin拷贝到tomcat相应的目录下(注意:是TOMCAT-HOME/server/web...
2007-12-14 18:37:05
163
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人