- 浏览: 16087 次
- 性别:
-
最新评论
文章列表
mybatis的配置
- 博客分类:
- JAVA
jdbc.properties
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/student?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
url1=jdbc:mysql://localhost:3306/d?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNu ...
pom
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<g ...
接着上次的
DAO层
删除操作
package com.zhouxiaobo.demo;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRe ...
是一个图书的增删改查
JDBC的连接
package com.zhouxiaobo.demo.jdbc.util;
import java.sql.Connection;
public interface DBUtil {
public Connection openConn();
public void closeConn();
}
重写
package com.zhouxiaobo.demo.jdbc.util;
import java.sql.Connection;
import java.sql.DriverManager;
public class Default ...