基于SpringBoot+Vue+MySQL的旅游网站-代码展示

// 数据库连接代码  
import java.sql.Connection;  
import java.sql.DriverManager;  
import java.sql.SQLException;  
  
public class DatabaseConnection {  
    private static final String DB_URL = "jdbc:mysql://localhost:3306/travel_db";  
    private static final String DB_USER = "root";  
    private static final String DB_PASSWORD = "password";  
  
    public static Connection getConnection() throws SQLException {  
        return DriverManager.getConnection(DB_URL, DB_USER, DB_PASSWORD);  
    }  
}
上一篇:Qt 概述


下一篇:鹏哥C语言64---第10次作业:数组相关