上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 25 下一页
摘要: //Dao类package com.dao.bean.www;public interface PersonServiceDao { public abstract void save();}//Beanpackage com.bean.www;import com.dao.bean.www.Per... 阅读全文
posted @ 2014-03-29 02:04 MrMrCash 阅读(291) 评论(0) 推荐(0) 编辑
摘要: /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open ... 阅读全文
posted @ 2014-03-23 22:51 MrMrCash 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 1.添加commons-dbcp-1.4,commons-logging,commons-pool-1.2//线程池,commons.collections-3.2.1.jar,spring.jar2.利用spring的查询方法和jdbc "DataSource数据源"package com.min... 阅读全文
posted @ 2014-02-04 00:23 MrMrCash 阅读(367) 评论(0) 推荐(0) 编辑
摘要: MyDataSource实现封装连接池,MyConnection实现connection类,通过代理模式相互调用package cn.itcast;import java.sql.*;public class ConnectDemo { public static void main(String[... 阅读全文
posted @ 2014-01-24 22:46 MrMrCash 阅读(196) 评论(0) 推荐(0) 编辑
摘要: package cn.itcast.Reflect;import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;import java.sql.Connection;import java.sq... 阅读全文
posted @ 2014-01-18 19:36 MrMrCash 阅读(798) 评论(0) 推荐(0) 编辑
摘要: package cn.itcast.Reflect;import java.lang.reflect.Constructor;import java.lang.reflect.Field;import java.lang.reflect.InvocationTargetException;impor... 阅读全文
posted @ 2014-01-18 19:34 MrMrCash 阅读(215) 评论(0) 推荐(0) 编辑
摘要: package cn.itcast.batch;import java.sql.Connection;import java.sql.ParameterMetaData;import java.sql.PreparedStatement;import java.sql.ResultSet;impor... 阅读全文
posted @ 2014-01-18 19:33 MrMrCash 阅读(559) 评论(0) 推荐(0) 编辑
摘要: 异常处理参考3层解耦ublic class ScrollTest { public static void main(String[] args) throws SQLException { // TODO Auto-generated method stub Object[] params =... 阅读全文
posted @ 2014-01-15 23:51 MrMrCash 阅读(412) 评论(0) 推荐(0) 编辑
摘要: public static void create2(int i) { Connection conn = null; Statement st = null; ResultSet rs = null; try { conn = JdbcUtils.getConnection(); ... 阅读全文
posted @ 2014-01-15 22:55 MrMrCash 阅读(340) 评论(0) 推荐(0) 编辑
摘要: Dao - 提供接口DaoImpl - 实现DaoFactory - 工厂模式获取实现DaoExcetpion - jdbc异常处理 实现runtime exception类即可TestDemo - 主函数User - beandaoconfig.properties - 配置文件package c... 阅读全文
posted @ 2014-01-15 00:00 MrMrCash 阅读(206) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 25 下一页