@Test public void testGetUserbyID() { User user = userDao.getUserbyID(1); assertNotSame(null, user); logger.debug("user is "+user); }
@Override public User getUserbyID(int id) { return this.jdbcTemplate .queryForObject( "select user_id, imei, imsi, phone_name from t_user where user_id =?", new Object[] { id }, userMapper()); }
UserDaoJDBC implements UserDao { @Override public User getUserbyID(int id) { return this.jdbcTemplate .queryForObject( "select user_id, imei, imsi, phone_name from t_user where user_id =?", new Object[] { id }, userMapper()); } }
UserDaoJDBC implements UserDao { @Override public User getUserbyID(int id) { return this.jdbcTemplate .queryForObject( "select user_id, imei, imsi, phone_name from t_user where user_id =?", new Object[] { id }, userMapper()); } @Autowired  UserDaoJDBC(DataSource datasource); }
UserDaoJDBC implements UserDao { @Override public User getUserbyID(int id) { return this.jdbcTemplate .queryForObject( "select user_id, imei, imsi, phone_name from t_user where user_id =?", new Object[] { id }, userMapper()); } @Autowired  UserDaoJDBC(DataSource datasource); @Override int getUserCount(); @Override User getUserbyID(int id); @Override List<User> getUsers(); @Override User addUser(final User user); @Override int updateUser(User user); }
UserDaoJDBC implements UserDao { @Override public User getUserbyID(int id) { return this.jdbcTemplate .queryForObject( "select user_id, imei, imsi, phone_name from t_user where user_id =?", new Object[] { id }, userMapper()); } @Autowired  UserDaoJDBC(DataSource datasource); @Override int getUserCount(); @Override User getUserbyID(int id); @Override List<User> getUsers(); @Override User addUser(final User user); @Override int updateUser(User user);  }