public App getApp(String appName) {
String sql = "select app_name, description, creator, create_time from config_app where app_name=?";
List<App> r = getJdbcTemplate().query(sql, new Object[]{appName}, new RowMapper<App>() {
@Override
public App mapRow(ResultSet rs, int rowNum) throws SQLException {
return new App(rs.getString(1), rs.getString(2), rs.getString(3), rs.getDate(4));
}
});
return !r.isEmpty() ? r.get(0) : null;
}