package com.bcxin.survey.dao.report;

import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Properties;

public class OldRiskDBConnection {
		
	public Connection getOldRiskDBConnection() throws Exception {
//		InputStream is = this.getClass().getClassLoader().getResourceAsStream("jdbc.properties");
//		Properties property = new Properties();
//		property.load(is);
//		String driverClassName = property.getProperty("old.risk.jdbc.driverClassName");
//		String url = property.getProperty("old.risk.jdbc.url");
//		String username = property.getProperty("old.risk.jdbc.username");
//		String password = property.getProperty("old.risk.jdbc.password");
		String driverClassName = "com.mysql.jdbc.Driver";
		String url = "jdbc:mysql://bcxin366.mysql.rds.aliyuncs.com:3306/bcxin_risk_0_2?useUnicode=true&characterEncoding=utf8";
		String username = "baichuanxin";
		String password = "bcxTest01";
		Connection conn = null;
		try {
			Class.forName(driverClassName);
			conn = DriverManager.getConnection(url, username, password);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return conn;
	}
}
	
