资源简介

主要是在myeclipse中运行的类图书馆小项目,运用servlet,可连接数据库操作数据:如登录注册,借阅归还图书,后台管理员各种增删改查。

资源截图

代码片段和文件信息

package DB;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBconnect {
public static Connection getconnect(){
String driverClass=“com.mysql.jdbc.Driver“;
Connection conn=null;
String url=“jdbc:mysql://localhost:3306/test“;
String name=“root“;
String psd=“root“;
try {
Class.forName(driverClass);
} catch (ClassNotFoundException e) {
System.out.println(“数据库驱动加载失败!“);
e.printStackTrace();
}
try {
conn=DriverManager.getConnection(url name psd);
} catch (SQLException e) {
System.out.println(“连接建立失败!“);
e.printStackTrace();
}
return conn;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        4296  2018-09-03 14:18  library\src\test.sql
     目录           0  2018-08-09 15:55  library\
     文件        1093  2018-08-09 16:00  library\.classpath
     文件        1332  2018-08-09 16:05  library\.project
     目录           0  2018-08-09 15:55  library\.settings\
     文件         522  2018-08-09 15:55  library\.settings\.jsdtscope
     文件         364  2018-08-09 16:00  library\.settings\org.eclipse.jdt.core.prefs
     文件         480  2018-08-09 15:55  library\.settings\org.eclipse.wst.common.component
     文件         414  2018-08-09 15:58  library\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2018-08-09 15:55  library\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2018-08-09 15:55  library\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2018-08-09 15:55  library\WebRoot\
     目录           0  2018-08-09 15:55  library\WebRoot\meta-INF\
     文件          39  2018-08-09 15:55  library\WebRoot\meta-INF\MANIFEST.MF
     目录           0  2018-08-09 15:55  library\WebRoot\WEB-INF\
     文件         993  2018-08-11 17:08  library\WebRoot\WEB-INF\ERROR.jsp
     文件        2509  2018-08-14 15:56  library\WebRoot\WEB-INF\bookadd.jsp
     文件        2068  2018-08-12 15:59  library\WebRoot\WEB-INF\bookpeopleEdit.jsp
     文件        3466  2018-08-14 09:39  library\WebRoot\WEB-INF\borrowed.jsp
     目录           0  2018-08-09 15:55  library\WebRoot\WEB-INF\classes\
     目录           0  2018-08-09 16:01  library\WebRoot\WEB-INF\classes\DB\
     文件        1383  2018-08-09 16:01  library\WebRoot\WEB-INF\classes\DB\DBconnect.class
     目录           0  2018-08-09 16:01  library\WebRoot\WEB-INF\classes\PeopleApi\
     文件        8927  2018-08-14 11:05  library\WebRoot\WEB-INF\classes\PeopleApi\BookAction.class
     文件        6042  2018-08-14 10:51  library\WebRoot\WEB-INF\classes\PeopleApi\BorrowAction.class
     文件        2466  2018-08-14 13:23  library\WebRoot\WEB-INF\classes\PeopleApi\BorrowInfoAction.class
     文件        5934  2018-08-12 14:27  library\WebRoot\WEB-INF\classes\PeopleApi\ManagerPeopleAction.class
     文件        7800  2018-08-13 12:37  library\WebRoot\WEB-INF\classes\PeopleApi\PeopleAction.class
     目录           0  2018-08-09 16:01  library\WebRoot\WEB-INF\classes\model\
     文件        1667  2018-08-12 15:13  library\WebRoot\WEB-INF\classes\model\Book.class
     文件        2339  2018-08-13 16:49  library\WebRoot\WEB-INF\classes\model\Borrow.class
............此处省略46个文件信息

评论

共有 条评论