1718192021222324
private TagManager tagManager = null; @RequestMapping(value = "/add", method = RequestMethod.GET) public String addTag(Model model) { model.addAttribute("tag", new Tag()); return "tag-form"; }
39404142434445464748
class TagRowMapper implements RowMapper<Tag> { @Override public Tag mapRow(ResultSet rs, int numRow) throws SQLException { Tag tag = new Tag(); tag.setId(rs.getInt("id")); tag.setName(rs.getString("name")); return tag; }