空指针异常
public List<Message> queryMessageList(String command,String description ){
DBAccess dbAccess = new DBAccess();
SqlSession sqlSession = null;
List<Message> list = new ArrayList<Message>();
try {
dbAccess.getSqlSession();
//通过sqlSession执行sql语句
list = sqlSession.selectList("Message.queryMessageList");//空指针异常
} catch (IOException e) {
e.printStackTrace();
} finally {
if(sqlSession!=null){
sqlSession.close();
}
}
return list;
}