Skip to content

Commit

Permalink
refactor: update 반환값 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
waterricecake committed Sep 29, 2023
1 parent cdcc90a commit a770057
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import javax.sql.DataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.DataAccessException;

public class JdbcTemplate {

Expand Down Expand Up @@ -108,10 +109,9 @@ public int update(final String sql, final Object... parameters) {
pstmt.setObject(i, parameter);
i++;
}
pstmt.executeUpdate();
return 1;
return pstmt.executeUpdate();
} catch (SQLException e) {
return 0;
throw new DataAccessException();
}
}
}

0 comments on commit a770057

Please sign in to comment.