@Test public void testSelectById() { UserDO user = userDao.selectById(1); System.out.println(user); }
public UserDO selectById(Integer id) { return template.queryForObject("SELECT id, username FROM users WHERE id = ?", new BeanPropertyRowMapper<>(UserDO.class), id); }
UserDao { public UserDO selectById(Integer id) { return template.queryForObject("SELECT id, username FROM users WHERE id = ?", new BeanPropertyRowMapper<>(UserDO.class), id); } }
UserDao { public UserDO selectById(Integer id) { return template.queryForObject("SELECT id, username FROM users WHERE id = ?", new BeanPropertyRowMapper<>(UserDO.class), id); }  }
UserDao { public UserDO selectById(Integer id) { return template.queryForObject("SELECT id, username FROM users WHERE id = ?", new BeanPropertyRowMapper<>(UserDO.class), id); }  UserDO selectById(Integer id); }
UserDao { public UserDO selectById(Integer id) { return template.queryForObject("SELECT id, username FROM users WHERE id = ?", new BeanPropertyRowMapper<>(UserDO.class), id); }  UserDO selectById(Integer id);  }