• 大小: 38KB
    文件类型: .zip
    金币: 1
    下载: 1 次
    发布日期: 2021-07-01
  • 语言: Java
  • 标签: JDBC  MySQL  

资源简介

大二的实验,Java+MySQL,一套模板,可以改config里的设置变成自己想要的

资源截图

代码片段和文件信息

package com.config;

/**
 * Author : kee lee
 * Time : 18:27:56 2018-12-14
 * Coding : UTF-8
 * 设置类,程序的各类属性都写在这里面
 */
public final class Config {

    // 创建数据库
    public static final String CREATE_DATAbase = “CREATE DATAbase IF NOT EXISTS student_manager“;

    // 建表语句,创建三个表,管理员、临时表、学生成绩表
    public static final String CREATE_STUDENT_TABLE = “CREATE TABLE IF NOT EXISTS student_manager.student_info(“
                        + “student_num varchar(255) not null“
                        + “student_name varchar(255) not null“
                        + “student_score varchar(255) not null“
                        + “)charset=utf8;“;
    public static final String CREATE_TMP_TABLE= “CREATE TABLE IF NOT EXISTS student_manager.temp(“
                        + “student_num varchar(255) not null“
                        + “student_name varchar(255) not null“
                        + “student_score varchar(255) not null“
                        + “)charset=utf8;“;
    public static final String CREATE_ADMIN_TABLE = “CREATE TABLE IF NOT EXISTS student_manager.admin(“
                        + “admin_name varchar(255) not null“
                        + “admin_password varchar(255) not null“
                        + “)charset=utf8;“;

    // 登录页面标题
    public static final String LOGIN_title = “管理员登录“;

    // 程序主标题
    public static final String MAIN_title = “学生成绩管理系统“;

    // 数据库驱动程序
    public static final String DRIVER = “com.mysql.jdbc.Driver“;

    // 数据库的链接,使用utf-8登录,按照自己的环境手动更改
    public static final String DATAbase_URL = “jdbc:mysql://localhost:3306/studentmanager?serverTimezone=GMT%2B8&useSSL=false&useUnicode=true&characterEncoding=utf-8“;

    // 数据库的管理员账户和密码,自己根据自己的数据库账号更改
    public static final String DATAbase_USER_NAME = ““;
    public static final String DATAbase_PASSWORD = ““;

    // 按钮长宽属性
    public static final int DEFAULT_BUTTON_WEDTH = 20;
    public static final int DEFAULT_BUTTON_HEIGHT = 10;

    // 各类按钮名称
    public static final String ADD_BUTTON = “添加数据“;
    public static final String DELETE_BUTTON = “删除数据“;
    public static final String LOGIN_BUTTON = “登录“;
    public static final String LOOKUP_BUTTON = “查找“;
    public static final String FIND_STUDENT = “查找学生“;
    public static final String SUBMIT_BUTTON = “提交“;
    public static final String EXIT_BUTTON = “退出“;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-12-26 19:52  .idea\
     文件         870  2018-12-18 23:31  .idea\dataSources.local.xml
     文件         925  2018-12-18 23:31  .idea\dataSources.xml
     目录           0  2018-12-21 22:49  .idea\dataSources\
     文件       37669  2018-12-18 23:31  .idea\dataSources\6b71f5d4-6884-4ee7-ad13-c027d08cb4f8.xml
     文件         138  2018-12-14 10:23  .idea\encodings.xml
     文件         278  2018-12-14 10:23  .idea\misc.xml
     文件         277  2018-12-14 10:23  .idea\modules.xml
     文件         414  2018-12-19 00:52  .idea\sqldialects.xml
     文件       24887  2018-12-26 19:52  .idea\workspace.xml
     目录           0  2018-12-21 22:47  out\
     目录           0  2018-12-21 22:47  out\production\
     目录           0  2018-12-22 11:36  out\production\Student_Manager\
     目录           0  2018-12-25 01:08  out\production\Student_Manager\com\
     目录           0  2018-12-22 11:36  out\production\Student_Manager\com\config\
     文件        1812  2018-12-22 11:36  out\production\Student_Manager\com\config\Config.class
     目录           0  2018-12-25 01:08  out\production\Student_Manager\com\controler\
     文件         804  2018-12-25 01:08  out\production\Student_Manager\com\controler\Controler$1.class
     文件        3077  2018-12-25 01:08  out\production\Student_Manager\com\controler\Controler.class
     目录           0  2018-12-23 16:09  out\production\Student_Manager\com\dao\
     文件        2859  2018-12-23 16:09  out\production\Student_Manager\com\dao\DatabaseConnector.class
     文件        2623  2018-12-22 11:36  out\production\Student_Manager\com\dao\TableContent.class
     目录           0  2018-12-22 11:36  out\production\Student_Manager\com\main\
     文件         415  2018-12-22 11:36  out\production\Student_Manager\com\main\Main.class
     目录           0  2018-12-22 11:36  out\production\Student_Manager\com\model\
     文件         588  2018-12-22 11:36  out\production\Student_Manager\com\model\Admin.class
     文件         719  2018-12-22 11:36  out\production\Student_Manager\com\model\Student.class
     目录           0  2018-12-23 16:03  out\production\Student_Manager\com\views\
     文件         882  2018-12-22 11:36  out\production\Student_Manager\com\views\FindView$1.class
     文件        3092  2018-12-22 11:36  out\production\Student_Manager\com\views\FindView.class
     文件        2765  2018-12-22 11:36  out\production\Student_Manager\com\views\LoginView.class
............此处省略20个文件信息

评论

共有 条评论