//链接并读取数据库信息
SimpleDriverDataSource dataSource = new SimpleDriverDataSource();dataSource.setDriver(new oracle.jdbc.driver.OracleDriver());
dataSource.setUrl("jdbc:oracle:thin:@172.**.142.**:1521:orcl");
dataSource.setUsername("####");
dataSource.setPassword("*****");
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
String sqlSelect = "select * from users where name='翟静'";
List<User> listContact = jdbcTemplate.query(sqlSelect, ParameterizedBeanPropertyRowMapper.newInstance(User.class)); //User为表users的实体
return listContact.get(0);