PRivate Connection getConnection() throws SQLException{String url = "jdbc:MySQL://localhost:3306/shop";String user = "root";String passWord = "123";try {Class.forName("com.mysql.jdbc.Driver");return DriverManager.getConnection(url, user, password);} catch (ClassNotFoundException e) {e.printStackTrace();}return null;}
新闻热点
疑难解答