[在此处输入图像描述][1] 这是我的代码,当我在查询下运行时,我得到了 java.ioNotSerializabale 异常,我得到了这个异常
java.io.NotSerializableException
我的 pojo 类在这里 public class ProjectHelper implements Serializable {
private String name;
private String description;
private String company;
private String category;
private List<UserRegister> usersRegisterList;
private String startDate;
这是我的 DaoImpl 方法,其中出现错误“java.io.NotSerializableException”
@Override
public GenericModal getProjects(User email) throws SQLException {
String sql = "select p.project_name, p.project_description, p.company, p.start_date, p.end_date, " +
"p.category f.task, f.milestones, f.billing, f.time_log, f.messages, f.features_id, f.files, u.firstName" +
"u.lastname, u.email" +
" from project as p" +
"join userprojectrelation as upr" +
"on p.project_id=upr.project_id " +
"join users as u" +
"on u.UserId=upr.user_id" +
"join features as f " +
"on f.project_id=p.project_id" +
"where u.email=?";
int status = 0;
GenericModal genericModal=new GenericModal();
try {
List<ProjectHelper> projectHelper=jdbcTemplate.query(sql,new Object[]{email},new ProjectHelperMapper());
if (projectHelper.isEmpty()) {
return null;
} else {
genericModal.setObject(projectHelper);
}
// return genericModal;
} catch (Exception ex) {
genericModal.setException(ex.getMessage());
}
return genericModal;
}