//第一种方法,直接写
public static void way1(){
Connection connection = null;
Statement statement = null;
try {
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/WZRY?characterEncoding=utf8","root","4inleo"
);
statement = connection.createStatement();
String sql = "insert into SHOPPING values(1,'安琪拉','时之奇旅',660,'史诗')";
statement.executeUpdate(sql);
} catch (ClassNotFoundException|SQLException e) {
e.printStackTrace();
} finally {
if(statement!=null && connection!=null){
try {
statement.close();
connection.close();
} catch (SQLException throwables) {