DBUtils工具类
package com.htf.web.util;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
/**
* @author : htf
*
*/
public class DBUtils {
private static String url;
private static String driverClassName;
private static String userName;
private static String password;
static {
//实用类加载器加载属性文件
//文件一定要放在src路径下
//读取文件
InputStream is =DBUtils.class.getClassLoader().getResourceAsStream(