我从邮递员调用abc.war
方法时,将一个Java api null([])
文件导出到“服务器”中,该文件返回get
值。在本地系统上运行正常,但在服务器上无法正常运行。
Connection con= getConnection();
List<QuestionsModel> lstQuestions=new ArrayList<QuestionsModel>();
try
{
if(con!=null)
{
CallableStatement cstmt = null;
ResultSet rs = null;
cstmt = con.prepareCall("{call GetQuestions()}");
cstmt.execute();
rs = cstmt.getResultSet();
while (rs.next()) {
QuestionsModel questionsModel=new QuestionsModel();
questionsModel.setQuestionID(rs.getInt("QuestionID"));
questionsModel.setQuestion(rs.getString("Question"));
lstQuestions.add(questionsModel);
}
con.close();
System.out.println("Hello from GetQuestions Repository");
return lstQuestions;
}
}
catch (SQLException e) {
e.printStackTrace();
}
return lstQuestions;
预期:返回对象列表(QuestionData) 错误:没有错误。