Upgrade to 1.8

mongodb
Li Shengzhao 2016-02-19 09:47:38 +08:00
parent ccd206bb24
commit 3d5075aa1d
1 changed files with 13 additions and 19 deletions

View File

@ -15,11 +15,8 @@ import com.monkeyk.sos.domain.oauth.OauthClientDetails;
import com.monkeyk.sos.domain.oauth.OauthRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.PreparedStatementSetter;
import org.springframework.stereotype.Repository;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;
/**
@ -63,9 +60,7 @@ public class OauthRepositoryJdbc implements OauthRepository {
final String sql = " insert into oauth_client_details(client_id,resource_ids,client_secret,scope,authorized_grant_types,web_server_redirect_uri," +
" authorities,access_token_validity,refresh_token_validity,additional_information,trusted,autoapprove) values (?,?,?,?,?,?,?,?,?,?,?,?)";
this.jdbcTemplate.update(sql, new PreparedStatementSetter() {
@Override
public void setValues(PreparedStatement ps) throws SQLException {
this.jdbcTemplate.update(sql, ps -> {
ps.setString(1, clientDetails.clientId());
ps.setString(2, clientDetails.resourceIds());
@ -84,7 +79,6 @@ public class OauthRepositoryJdbc implements OauthRepository {
ps.setBoolean(11, clientDetails.trusted());
ps.setString(12, clientDetails.autoApprove());
}
});
}
}