@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public int add(Judge judge) { String sql = "insert into exam_judge(id, exam_id, content, answer, analysis, description, remark) values (?,?,?,?,?,?,?)"; String id = UUID.randomUUID().toString(); int addRows = jdbcTemplate.update( sql, new Object[] { id, judge.getExam_id(), judge.getContent(), judge.getAnswer(), judge.getAnalysis(), judge.getDescription(), judge.getRemark() }); return addRows; }