// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public final static String PASSWORD = "123456";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public final static String ROOT_URL = "jdbc:mysql://localhost:3306/"
// 		+ DATABASE_NAME;
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public final static String USER = "root";
// 
// Path: server/4FunServer/src/com/mollychin/bean/User.java
// public class User {
// 	private String userName;
// 	private String password;
// 	private int sex;
// 	private String email;
// 
// 	public String getUserName() {
// 		return userName;
// 	}
// 
// 	public void setUserName(String userName) {
// 		this.userName = userName;
// 	}
// 
// 	public String getPassword() {
// 		return password;
// 	}
// 
// 	public void setPassword(String password) {
// 		this.password = password;
// 	}
// 
// 	public int getSex() {
// 		return sex;
// 	}
// 
// 	public void setSex(int sex) {
// 		this.sex = sex;
// 	}
// 
// 	public String getEmail() {
// 		return email;
// 	}
// 
// 	public void setEmail(String email) {
// 		this.email = email;
// 	}
// }


import static com.mollychin.utils.ConstantsUtil.PASSWORD;
import static com.mollychin.utils.ConstantsUtil.ROOT_URL;
import static com.mollychin.utils.ConstantsUtil.USER;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.google.gson.Gson;
import com.mollychin.bean.User;
import com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException;
package com.mollychin.utils;





public class JDBCUtil {

	// 连接
	public static Connection getConnection() throws Exception {
		try {
			Class.forName("com.mysql.jdbc.Driver").newInstance();
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public final static String PASSWORD = "123456";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public final static String ROOT_URL = "jdbc:mysql://localhost:3306/"
// 		+ DATABASE_NAME;
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public final static String USER = "root";
// 
// Path: server/4FunServer/src/com/mollychin/bean/User.java
// public class User {
// 	private String userName;
// 	private String password;
// 	private int sex;
// 	private String email;
// 
// 	public String getUserName() {
// 		return userName;
// 	}
// 
// 	public void setUserName(String userName) {
// 		this.userName = userName;
// 	}
// 
// 	public String getPassword() {
// 		return password;
// 	}
// 
// 	public void setPassword(String password) {
// 		this.password = password;
// 	}
// 
// 	public int getSex() {
// 		return sex;
// 	}
// 
// 	public void setSex(int sex) {
// 		this.sex = sex;
// 	}
// 
// 	public String getEmail() {
// 		return email;
// 	}
// 
// 	public void setEmail(String email) {
// 		this.email = email;
// 	}
// }


// Path: server/4FunServer/src/com/mollychin/utils/JDBCUtil.java
import static com.mollychin.utils.ConstantsUtil.PASSWORD;
import static com.mollychin.utils.ConstantsUtil.ROOT_URL;
import static com.mollychin.utils.ConstantsUtil.USER;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.google.gson.Gson;
import com.mollychin.bean.User;
import com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException;

package com.mollychin.utils;





public class JDBCUtil {

	// 连接
	public static Connection getConnection() throws Exception {
		try {
			Class.forName("com.mysql.jdbc.Driver").newInstance();
			return DriverManager.getConnection(ROOT_URL, USER, PASSWORD);