提交 673482da authored 作者: inroi's avatar inroi

完成

上级 07a5f1d0
...@@ -6,6 +6,8 @@ import java.util.*; ...@@ -6,6 +6,8 @@ import java.util.*;
import javax.servlet.jsp.jstl.sql.*; import javax.servlet.jsp.jstl.sql.*;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import cn.hutool.core.lang.Console;
public class DBHelper { public class DBHelper {
private Connection con; //连接对象 private Connection con; //连接对象
...@@ -112,7 +114,23 @@ private Connection con; //连接对象 ...@@ -112,7 +114,23 @@ private Connection con; //连接对象
setSqlValues(pst,sqlValues); setSqlValues(pst,sqlValues);
} }
rst=pst.executeQuery(); rst=pst.executeQuery();
if(rst == null)
{
Console.log("executeQuery.rst为空");
}
else
{
Console.log("executeQuery.rst不为空");
}
result=ResultSupport.toResult(rst); //一定要在关闭数据库之前完成转换 result=ResultSupport.toResult(rst); //一定要在关闭数据库之前完成转换
if(result == null)
{
Console.log("executeQuery.result为空");
}
else
{
Console.log("executeQuery.result不为空");
}
} catch (SQLException e) { } catch (SQLException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论