java 代码
power_cheng
这个作者很懒,什么都没留下…
展开
-
获取数据库连接工具类
package com.power.util;import java.sql.Connection;import java.sql.DriverManager;import java.sql.SQLException;/** * @author chengwei * @date 2017年7月13日上午10:35:59 * @description:获取数据库连原创 2017-07-13 14:10:35 · 537 阅读 · 0 评论 -
使用连接池获取数据库连接
package com.power.util;import java.sql.Connection;import java.sql.SQLException;import org.apache.tomcat.dbcp.dbcp.BasicDataSource;/** * @author chengwei * @date 2017年7月13日下午1:19:23原创 2017-07-13 14:12:53 · 493 阅读 · 0 评论 -
使用Statement对数据库进行增删改查
package com.power.dao;import java.sql.Connection;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.text.MessageFormat;import com.power.util.D原创 2017-07-13 15:34:15 · 860 阅读 · 0 评论 -
根据数据库自动生成java代码
package com.power.util;import java.io.BufferedWriter;import java.io.File;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.io.原创 2017-07-08 19:43:14 · 3175 阅读 · 0 评论 -
使用PreparedStatement实现增删改查
package com.power.dao;import java.sql.Connection;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.text.Messa原创 2017-07-13 16:46:47 · 2306 阅读 · 0 评论