Skip to content

Conversation

@benelog
Copy link
Contributor

@benelog benelog commented Jan 15, 2021

This PR adds the constructor with a Callable<RepeatStatus> parameter to CallableTaskletAdapter.
It makes CallableTaskletAdapter more convenient.

AS-IS:

    var tasklet = new CallableTaskletAdapter();
    tasklet.setCallable(callable);

TO-BE:

    var tasklet = new CallableTaskletAdapter(callable);

@benelog benelog force-pushed the add-CallableTaskletAdapter-constructor branch 3 times, most recently from d676bb4 to 1c705c4 Compare January 15, 2021 23:54
@fmbenhassine fmbenhassine added the status: waiting-for-triage Issues that we did not analyse yet label Jan 21, 2021
*/
public CallableTaskletAdapter(Callable<RepeatStatus> callable) {
setCallable(callable);
afterPropertiesSet();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I referenced the constructor of JdbcTemplate, which also provides both setter and constructor injection.

https://github.com/spring-projects/spring-framework/blob/master/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java#L172

@fmbenhassine fmbenhassine added in: core pr-for: feature and removed status: waiting-for-triage Issues that we did not analyse yet labels Mar 15, 2021
@benelog benelog force-pushed the add-CallableTaskletAdapter-constructor branch from 1c705c4 to bbdd00c Compare March 13, 2023 15:32
@benelog
Copy link
Contributor Author

benelog commented Mar 13, 2023

@fmbenhassine
I resolved the conflicts with main branch now. Could you please review this PR again?

@fmbenhassine
Copy link
Contributor

LGTM. Rebased and merged as 31955a0. Thank you for your contribution!

@fmbenhassine fmbenhassine added this to the 5.1.0-M3 milestone Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants